Category: git

[git] 如何預設讓 branch / tag list 依照更新日期顯示

平常在用 git cli 時不免會想列出目前 remote / local 的所有 branch / tag,但預設排序會是依照字母顯示,導致不是很好找到最新更新的 branch / tag。 這裡記錄一下如何做對應的設定 依照 commit date 排序顯示 branch list 依照版本號順序顯示 tag list 以上兩個設定設定完後,會自動寫入至 /Users/user/.gitconfig,如下: 參考資料: https://github.com/git/git/blob/master/Documentation/RelNotes/2.19.0.txt https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit