美文网首页
Github同步fork的项目

Github同步fork的项目

作者: 李颖轩_LiYingxuan | 来源:发表于2017-09-29 13:29 被阅读18次

该篇文章主要用于将fork的项目的新提交同步并merge到本地。

以项目名叫project的为例,假设:
源地址:https://github.com/src/project.git
则我fork之后的地址:https://github.com/liyingxuan/project.git

1. 增加源分支地址到本地项目
cd project
git remote add ProjectName https://github.com/src/project.git
2. fetch源分支到本地
git fetch ProjectName
3. merge两个版本

注意:这里需要本地项目修改先commit

git merge ProjectName/master
4. 提交到我的地址
git push origin master

End.

相关文章

网友评论

      本文标题:Github同步fork的项目

      本文链接:https://www.haomeiwen.com/subject/bqdiextx.html