I forked a project, made changes, and created a pull request which was accepted. New commits were later added to the repository. How do I get those commits into my fork?
-
158This can also be done from the github UI. I'd like to give credit [to this other poster][1]. [1]: stackoverflow.com/a/21131381/728141– Mike SchrollCommented Feb 20, 2014 at 13:00
-
5Another good blog post on this - Keeping A GitHub Fork Updated– Arup RakshitCommented Oct 15, 2014 at 17:26
-
4Found this in Github help articles: help.github.com/articles/syncing-a-fork– PranavCommented Apr 2, 2015 at 8:57
-
2Is this a duplicate of stackoverflow.com/questions/3903817/… ?– David CaryCommented Aug 29, 2015 at 12:06
-
4Since May 2021 this is directly possible from the GitHub UI without extra pull request, see changelog and stackoverflow.com/a/67425996– Marcono1234Commented May 8, 2021 at 0:23
|
Show 4 more comments
32 Answers
Delete your remote dev from github page
then apply these commands:
1) git branch -D dev
2) git fetch upstream
3) git checkout master
4) git fetch upstream && git fetch upstream --prune && git rebase upstream/master && git push -f origin master
5) git checkout -b dev
6) git push origin dev
7) git fetch upstream && git fetch upstream --prune && git rebase upstream/dev && 8) git push -f origin dev
to see your configuration use this command:
git remote -v