赞
踩
<<<<<<< HEAD
### Author
winlin(winterserver): [http://blog.csdn.net/win_lin](http://blog.csdn.net/win_lin)
=======
### Authors
winlin: http://blog.csdn.net/win_lin
>>>>>>> aacaf3be5f70340964e7b50bf5dd9ab1151d192e
4. 解决然后提交就好了:
git commit -a -m "merge from winterserver"
[winlin@dev6 simple-rtmp-server]$ git branch
master
* winterserver-master
[winlin@dev6 simple-rtmp-server]$ git checkout master
Switched to branch 'master'
[winlin@dev6 simple-rtmp-server]$ git branch
* master
winterserver-master
[winlin@dev6 simple-rtmp-server]$ git merge winterserver-master
Updating cabf6e0..d5925fe
Fast-forward
README.md | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[winlin@demo simple-rtmp-server]$ git remote -v
origin git@github.com:winterserver/simple-rtmp-server.git (fetch)
origin git@github.com:winterserver/simple-rtmp-server.git (push)
[winlin@demo simple-rtmp-server]$ git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git
[winlin@demo simple-rtmp-server]$ git remote -v
origin git@github.com:winterserver/simple-rtmp-server.git (fetch)
origin git@github.com:winterserver/simple-rtmp-server.git (push)
upstream https://github.com/winlinvip/simple-rtmp-server.git (fetch)
upstream https://github.com/winlinvip/simple-rtmp-server.git (push)
[winlin@demo simple-rtmp-server]$ git fetch upstream
remote: Counting objects: 15, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 6), reused 7 (delta 4)
Unpacking objects: 100% (9/9), done.
From https://github.com/winlinvip/simple-rtmp-server
* [new branch] gh-pages -> upstream/gh-pages
* [new branch] master -> upstream/master
[winlin@demo simple-rtmp-server]$ git branch -va
* master aacaf3b update readme
remotes/origin/HEAD -> origin/master
remotes/origin/gh-pages b3ef9a1 Create gh-pages branch via GitHub
remotes/origin/master aacaf3b update readme
remotes/upstream/gh-pages b3ef9a1 Create gh-pages branch via GitHub
remotes/upstream/master d5925fe merge from winterserver
git checkout master
[winlin@demo simple-rtmp-server]$ git merge upstream/master
Updating aacaf3b..d5925fe
Fast-forward
README.md | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
查看分支:
[winlin@dev6 simple-rtmp-server.bk]$ git branch -va
gh-pages 38da587 rm cached Raspbian7 package.
* master d1b0d26 change release url to project https://github.com/winlinvip/srs.release
remotes/origin/HEAD -> origin/master
remotes/origin/gh-pages 38da587 rm cached Raspbian7 package.
remotes/origin/master d1b0d26 change release url to project https://github.com/winlinvip/srs.release
[winlin@dev6 simple-rtmp-server.bk]$ git branch -d gh-pages
[winlin@dev6 simple-rtmp-server.bk]$ git branch -va
* master d1b0d26 change release url to project https://github.com/winlinvip/srs.release
remotes/origin/HEAD -> origin/master
remotes/origin/gh-pages 38da587 rm cached Raspbian7 package.
remotes/origin/master d1b0d26 change release url to project https://github.com/winlinvip/srs.release
[winlin@dev6 simple-rtmp-server.bk]$ git branch -d -r origin/gh-pages
[winlin@dev6 simple-rtmp-server.bk]$ git branch -va
* master d1b0d26 change release url to project https://github.com/winlinvip/srs.release
remotes/origin/HEAD -> origin/master
remotes/origin/master d1b0d26 change release url to project https://github.com/winlinvip/srs.release
譬如将github上的srs在csdn上fork一套,github/srs => csdn/srs.csdn,然后checkout到本地:
git clone git@code.csdn.net:winlinvip/srs-csdn.git
然后创建同步的upstream和分支:
git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git
git fetch upstream
git checkout upstream/master -b srs.master
git checkout srs.master &&
git pull &&
git checkout master &&
git merge srs.master &&
git push
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。