The first part of the instructions is perfectly clear. You need:
- Log in to GitHub, go to the professor’s repository and click "Fork".
Find the SSH URL for your repository fork and clone it locally using something like:
git clone git@github.com:whoever/whatever.git
- If you run
git branch -r , you will see that you have a remote tracking branch origin/Project7 You need to work in this branch, so you need to create a local branch based on origin/Project7 . You can do it with
git checkout -b Project7 origin/Project7
Now you have to make your development and create commits, as usual, to advance the Project7 branch.
Now for the part that is a bit unclear to me:
[...] push the newly developed branch upstream to the main project repository
It could mean:
(a) That you return your branch to your own forked repository on GitHub. You can do it with git push origin Project7
On the other hand, this may mean (b) that your professor added you as a co-author to his repository on GitHub and wants you to click on a new branch in your repository. In this case, you can do something like:
git remote add professor git@github.com:professor/whatever.git git push professor Project7:WarDoGG-Project7
This will cause your Project7 branch Project7 move to a new branch in the professor's repository: WarDoGG-Project7 . Or he may want you to just push your branch back to the original Project7 , in which case you can just skip part of the command :<destination-branch> .
I think situation (a) is more likely, but you should check.
Mark longair
source share