I see a lot of posts about this and I know the general answer, executing this from my fork's local repo:
git remote add upstream https://github.com/abcd/efgh.git
git fetch upstream
git merge upstream/master
(resolve merge conflicts)
git commit -m "my message"
git push
But I have a couple of questions beyong the general case.
- When I do the
git push
, why do i not have to specify with remote I am pushing to? or do I? - Also, how can i get a particular commit id from
upstream
instead of the latest commit which is what I would get when I dofetch upstream
?