We're going to fork someone else's project, which creates a copy of the project on GitHub that doesn't affect the original author, and can clone the project on GitHub to a local change, modify it, and push it, and only the project on GitHub will be changed. The original author project will not be affected, avoid the original author project is contaminated. But if the original author is constantly updating his project, how to make his own github on the same sync? Here's a tool for installing GitHub in Windows, a git Shell that has never known its usefulness, this time.
1) go to the Local project directory and enter Git remote-v:
The URL inside the basket is the item on my github, and the URL in the red box is the original author item. If there is no upstream, i.e. no URL for the original author project, you need to add it yourself: Git remote add upstream < original author Project url>
2) Synchronize the contents of the original Author project update to my local project (not my GitHub online project):
A) Fetch the branches and their respective commits from the upstream repository. Commits tomaster would be stored in a local branch, Upstream/master.
b) Check out your fork ' s local masterbranch.
c) The next step is to merge the two branches, synchronizing the changes of the original author's project to your own (note or local project, not the project in your own GitHub space). Merge the changes fromupstream/master to your local master branch. This brings your fork ' s Master branch to sync with the upstream repository, without losing your local changes.
My local project is now synchronized with the original author project.
3) also keep your GitHub space projects in sync:
Push a local project's modifications (that is, content synchronized with the original author project) to your GitHub with another tool Github.exe
How to stay synchronized after a fork on GitHub (Windows environment)