Sunday, 15 August 2010

git - Does Github have a way to synchronize your fork with cloned repo? -


Does the Geithub source provide a way to synchronize a github repo fork with a change in the RIFO?

For example, I rename a repo fork, and master to upstream , which I want to synchronize with the changes in the source repo Can Github synchronize my upstream? Regularly with the master of the source repo

No, Github does not provide it. Instead, you can get it locally.

First, create a local repository, create your own remote and retrieve it.

  git init git remote add origin git@github.com:  

Next step, add a remote branch to your repository which is the original Indicates repo.

Git Remote Ad Track Master & lt; Repo-name & gt; Git: //github.com/< Username & gt; / & Lt; Source-repo & gt; .git

Note that the master will be the branch that you want to track in the fork repo & lt; Repo-name & gt; Depends on you if you want to verify, just run git remote and you & lt; Repo-name & gt; and original as output.

Now, you are ready to receive all the new changes from the original repo.

  git fetch & lt; Repo-name & gt;  

& lt; Repo-name & gt; A new branch called / master will be created with the latest changes.


No comments:

Post a Comment