1

I just finished my first project on CS50(web programming with python and javascript) using visual studio code. But am finding it difficult to submit using github. Please someone should help me. I don't know how to submit my project with github (I use visual studio code for the project)

5

I did the following thanks to the advice of a friend:

  1. You must have an account on github.com, then you must have git installed on your PC.
  2. A folder for example SEARCH that contains all the project files.

Then you must enter the GIT BASH

  • Move inside the SEARCH folder and execute the following commands:

...

git init
git remote add origin https://github.com/me50/YOURUSERNAME.git
git add -A
git commit -m "Submit my project 0"
git push origin master:web50/projects/2020/x/search

...

Note: If it asks you to login github, do so with your username and password. Ignore any alerts.

Description:

gig init   -> Create an empty Git repository or reinitialize an existing one (in your folder  - PC).
git remote   -> Manage the set of repositories ("remotes") whose branches you track.
git remote add origin https://github.com/me50/YOURUSERNAME.git  -> The git remote add command takes two arguments: origin and the url
git add -A    -> all files in the entire working tree are add
git commit -m "Submit my project 0" -> Create a new commit and the given log message describing the changes
git push origin master:web50/projects/2020/x/search   -> git push command takes two arguments origin and master:xxxxx (origin is pushed to target)
-2

you could try with Github Desktop, you can download your own repository, copy-paste your code in that directory and then push back to the main github repo. let me know if you need further help.

1
  • When I clone the directory, I meet authentication error, what should I do? Apr 17 '20 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .