git配置
github的使用:https://github.com/runchen0518/OnlineJudge/blob/master/README.md
$ git config --global user.name "***" $ git config --global user.email "***" $ ssh-keygen -t rsa -C "email***"
git使用方法
- 撤銷commit:
$ git reset HEAD^
- 回退代碼:
$ git log //查看要回退到的commit號 $ git reset --hard commit號
- 分支合並:
分為兩種辦法:
第一種方法是直接使用諸如sourcetree這樣的GUI版本控制工具:
假如我需要將develop分支上的代碼合並到master分支,先切到develop分支,然后點擊合並到某某分支;
然后arc diff,把下面的一些D號給刪掉就可以提交了.
第二種方法是命令行下操作的:
$ git checkout develop $ git merge master $ git add . $ git commit -m "T12345 合並分支" $ arc diff
如何上傳代碼:
先git clone http://***/***.git到本地的workspace;
要是不行的話就git clone ssh://git@***/***.git;
注意:在工程目錄里面要添加一個.arcconfig
代碼添加到項目工程里面去
$ git add *** $ git commit -m "T1234 introduction"
注意:commit里面一定要添加你的Task號,沒有的話就new一個
arc diff:
$ arc diff --create
如果通過了就可以提交代碼了
//兩者取其一,后者更好 $ arc land $ git push
最后會get一個Differential號,以及網址,可以上去看自己的push list;
如何配置Phabricator Arcanist
- 先安裝php
- 安裝SVN客戶端或者git客戶端
- 安裝Arcanist及libphutil
參考網址:
http://blog.csdn.net/rilyu/article/details/37379873
https://sites.google.com/a/khanacademy.org/forge/for-developers/code-review-policy/using-phabricator
