2

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 2

14

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 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)
1
  • What should happen after you push it? How do you know if or when they grade them? Oct 27, 2023 at 18:07
-3

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.

2
  • When I clone the directory, I meet authentication error, what should I do? Apr 17, 2020 at 10:59
  • Hey man, thank you so much Feb 23, 2022 at 9:52

You must log in to answer this question.

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