From e22b7b17d509ef7b0a74944df30d73c6ed55eca3 Mon Sep 17 00:00:00 2001 From: Pratyush Date: Thu, 16 Jun 2016 15:19:33 +0530 Subject: [PATCH] Add tip to show recently updated branches --- README.md | 6 ++++++ tips.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 1730796..72c1c89 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Ignore file mode changes on commits](#ignore-file-mode-changes-on-commits) * [Turn off git colored terminal output](#turn-off-git-colored-terminal-output) * [specific color settings](#specific-color-settings) +* [Show all local branches ordered by recent commits](#show-all-local-branches-ordered-by-recent-commits) @@ -781,5 +782,10 @@ git config --global color.ui false git config --global ``` +## Show all local branches ordered by recent commits +```sh +git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ +``` + diff --git a/tips.json b/tips.json index 6034145..81ce8d4 100644 --- a/tips.json +++ b/tips.json @@ -342,4 +342,7 @@ },{ "title": "specific color settings", "tip": "git config --global " +},{ + "title": "Show all local branches ordered by recent commits", + "tip": "git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/" }]