本人愚钝,在网上看了很多教程也没太弄明白如何跟别人合作开发,一下是与同学在github上合作的简记。
推荐廖雪峰的文档:
http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000
环境:OS X E1
下载文件到本地
git clone https://github.com/user/repository.git
本地操作
\#创建新的分支并且换
git checkout -b branch-name
git add .
git commit -m 'delineation of your work'
把分支推上主线并创建pull request
git push origin branch-name
or
git push origin local:remote
创建pull request
关联某一个issue就写Reference:#4 (No. of issue)
PS一些实用的git指令:
删除分支: git branch -d branch-name
关联远程库:git remote add url
显示现在状态:git status
回到上一个版本: git reset –hard HEAD (上上个是HEAD^)
显示提交日志:git log