Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

after I fork a github project, how can I stay current with the original project?

Tags:

On github, after I fork a project, modify it, then submit my pull request, it seems that I have to delete and re-fork in order to stay current with any changes made after my pull request is honored.

It seems tedious to have to keep deleting the repo to keep it current. Is there some way to keep it current without deleting and re-forking?

like image 670
Terrence Brannon Avatar asked May 04 '10 17:05

Terrence Brannon


People also ask

How do I sync forked with original GitHub?

On GitHub, navigate to the main page of the forked repository that you want to sync with the upstream repository. Select the Sync fork dropdown. Review the details about the commits from the upstream repository, then click Update branch.

What happens when you fork GitHub?

A fork is a copy of a repository that you manage. Forks let you make changes to a project without affecting the original repository. You can fetch updates from or submit changes to the original repository with pull requests.

What happens when I fork a repository?

A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.


1 Answers

You should add the original project as a remote to your working copy. Then you can pull changes from the original repository and push them to your forked repository. The commands for this look something like:

git remote add upstream <original repo url> git pull upstream master git push origin 
like image 89
Geoff Reedy Avatar answered Sep 21 '22 08:09

Geoff Reedy