https://help.github.com/articles/fork-a-repo
http://stackoverflow.com/questions/7200614/how-to-merge-remote-master-to-local-branch
1. Fork对方的Reopository: yongmingzhang/Proj
2. Clone your fork到本地
git clone https://github.com/yongmingzhang/Proj.git
3. Configure remotes
$ cd Proj # Changes the active directory in the prompt to the newly cloned "Spoon-Knife" directory $ git remote add upstream https://github.com/octocat/Spoon-Knife.git # Assigns the original repository to a remote called "upstream" $ git fetch upstream # Pulls in changes not present in your local repository, without modifying your files4. Fetch + Merge对方的版本和自己的版本
$ git fetch upstream # Fetches any new changes from the original repository $ git merge upstream/master # Merges any changes fetched into your working filesmerge期间如果有冲突,需要手动打开有冲突的文件,确定保留冲突双方中的某一部分,删掉另一部分。
git commit结束merge。
5. 如果是merge remote的某个branch到本地的某个branch:
(1)
Switch to your local branch
git checkout configUpdate
(2) Fetch remote repo
$ git fetch upstream
(3)Merge remote master branch to the local configUpdate branch
$ git merge upstream/master