隨筆-11  評論-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 閱讀(178) 評論(0)  編輯  收藏

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


          網(wǎng)站導航:
           
          主站蜘蛛池模板: 简阳市| 万山特区| 中阳县| 呈贡县| 抚顺市| 大悟县| 南溪县| 东平县| 油尖旺区| 宽甸| 湘潭市| 且末县| 怀柔区| 大丰市| 阜康市| 清徐县| 光泽县| 长宁县| 江津市| 崇州市| 郁南县| 嘉鱼县| 四子王旗| 忻州市| 抚远县| 陕西省| 新乡市| 土默特右旗| 鄄城县| 静宁县| 唐河县| 乌鲁木齐市| 大安市| 昭通市| 紫云| 和林格尔县| 玛纳斯县| 怀远县| 胶州市| 徐闻县| 山东|