Last active
December 8, 2015 10:29
-
-
Save luchuan/e3011994c9da8786d6c2 to your computer and use it in GitHub Desktop.
fork - pr 协作模式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
主仓库: https://github.com/owner/repo.git | |
开发仓库:https://github.com/collaborator/repo.git | |
开发准备: | |
git clone https://github.com/collaborator/repo.git | |
git remote -v (看一下是否有添加 upstream) | |
git remote add upstream https://github.com/owner/repo.git (如果没有,添加一下) | |
git pull upstream branchname(与主仓库最新的代码合并一下) | |
本地开发: | |
git add file1 file2 ... (添加修改的文件) | |
git commit -m '我是一条 commit 信息,说明这次 commit 干嘛了' | |
git push origin branchname(把本地的 commits 推到开发仓库对应的 branch) | |
发PR: | |
在开发仓库的 web 界面上创建 pull request 给主仓库 | |
主仓库管理员 review PR 后合并 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment