隨筆-11  評(píng)論-10  文章-8  trackbacks-0
          checkout <branch>
          switch branch
          checkout -b <new branch>
          create new branch and switch to it
          checkout <file>
          checkout file in HEAD and overwrite local file (NOTE: use it carefully, maybe lost your local work)

          diff
          diff index and working copy
          diff --cached
          diff index and last commit, which is what you will commit without '-a' option

          log
          display commit logs
          log -p
          include commit diff
          log --first-parent
          follow only the first parent commit upon seeing a merge commit. This option gives a better overview of the evolution of a particular branch.
          log -S'string'
          commits which add or remove data matching the 'string'
          log -r --name-status
          show changed files with full path and status, just like 'svn diff --summarize'

          branch       
          display all branches, current branch started with *
          branch -r
          display remote branches
          merge --no-commit   
          not commit immediately, all changes write to index

          reset --mixed       
          default, adjust HEAD and clear index, changes in working copy is reserved, and changes between original HEAD and current HEAD will write to working copy
          reset --soft       
          adjust HEAD, changes between original HEAD and current HEAD will write to index
          reset --hard       
          adjust HEAD, and clear index and working copy (NOTES: only use it when you are sure that the changes in index, working copy and changes reset in history will never be used)







          posted on 2008-05-27 00:29 JBahamut 閱讀(176) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 金山区| 略阳县| 贞丰县| 南丰县| 楚雄市| 逊克县| 潜山县| 敦化市| 会昌县| 霍林郭勒市| 嘉峪关市| 南京市| 文昌市| 莒南县| 阳东县| 许昌县| 舒兰市| 开阳县| 大洼县| 东兴市| 突泉县| 三门峡市| 伊宁县| 汉川市| 平利县| 林甸县| 韶山市| 芷江| 建阳市| 和静县| 邯郸县| 房山区| 阿巴嘎旗| 江山市| 景德镇市| 宿州市| 垣曲县| 碌曲县| 铜川市| 神农架林区| 和静县|