git log
- git log
- git log -p -1
展開顯示最近一次的提交差異; - git log –stat
顯示簡要的函數統計 - git log –pretty=oneline
git log –pretty=format:”%h - %an, %ar : %s”
選項 說明 %H 提交對象(commit)的完整哈希字串 %h 提交對象的簡短哈希字串 %T 樹對象(tree)的完整哈希字串 %t 樹對象的簡短哈希字串 %P 父對象(parent)的完整哈希字串 %p 父對象的簡短哈希字串 %an 作者(author)的名字 %ae 作者的電子郵件地址 %ad 作者修訂日期(可以用 -date= 選項定製格式) %ar 作者修訂日期,按多久以前的方式顯示 %cn 提交者(committer)的名字 %ce 提交者的電子郵件地址 %cd 提交日期 %cr 提交日期,按多久以前的方式顯示 %s 提交說明
時間人員過濾
–since, –after 僅顯示指定時間之後的提交。
–until, –before 僅顯示指定時間之前的提交。
–author 僅顯示指定作者相關的提交。
–committer 僅顯示指定提交者相關的提交。
git log –before={3,weeks,ago} –after={2010-04-18}
git log –since=”2008-10-01”
git log –since=”2008-10-01” –author=someone
git branch
- git branch -a
- git branch
- git branch branchName
- git checkout -b branchName
- git push origin localBranchName
- git branch -d localBranchName
- git branch -r -d origin/branch-name; git push origin :branch-name
- git branch -va
origin
- git remove -v equals cat .git/config
- origin is an alias for your remote repository.