Want
git branchto show the branches you touched most recently at the top? Rob Allen shares a one-line Git configuration that sorts branches by their last commit date:git config --global branch.sort -committerdate. The leading minus sign puts the newest commit first, making the usual branch list more useful when a repository has accumulated branches over time.The change applies globally, so it affects
git branchacross repositories. Allen also gives the reset command,git config --global --unset branch.sort, for anyone who wants to restore Gitβs default ordering. It is a small quality-of-life tweak, but one that can save a bit of hunting around when returning to older work.
continue reading onakrabat.com
β οΈ This post links to an external website. β οΈ
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.