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)
2 Answers
I did the following thanks to the advice of a friend:
- You must have an account on github.com, then you must have git installed on your PC.
- 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 main: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 main:web50/projects/2020/x/search -> git push command takes two arguments origin and master:xxxxx (origin is pushed to target)
-
What should happen after you push it? How do you know if or when they grade them? Oct 27, 2023 at 18:07
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.
-
When I clone the directory, I meet authentication error, what should I do? Apr 17, 2020 at 10:59
-