A git alias to show a detailed git branch overview (#snippet)

I came across Carolyn Van Slyck’s article git wip: What the heck was I just doing?. She shared an excellent git alias (git wip) that shows all available branches and how long their last commit is ago.


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

I came across Carolyn Van Slyck's article git wip: What the heck was I just doing?. She shared an excellent git alias (git wip) that shows all available branches and how long their last commit is ago.

output of "git wip" command showing available branches with time to the last commit

[alias]
  wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads

I tweaked it a bit to include the commit message of the last commit and changed it to zup, too.

[alias]
  zup = for-each-ref --sort='authordate:iso8601' --format='%(color:green)%(authordate:relative)%09%(color:white)%(refname:short) / %(contents:subject)' refs/heads

That's the result. ?

Output of `git zup` command showing available branches, the time ago and the last commit message

Love it! Thanks, Carolyn!


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate
APA
Stefan Judis | Sciencx (2022-12-09T16:27:32+00:00) » A git alias to show a detailed git branch overview (#snippet). Retrieved from https://www.scien.cx/2020/12/16/a-git-alias-to-show-a-detailed-git-branch-overview-snippet/.
MLA
" » A git alias to show a detailed git branch overview (#snippet)." Stefan Judis | Sciencx - Wednesday December 16, 2020, https://www.scien.cx/2020/12/16/a-git-alias-to-show-a-detailed-git-branch-overview-snippet/
HARVARD
Stefan Judis | Sciencx Wednesday December 16, 2020 » A git alias to show a detailed git branch overview (#snippet)., viewed 2022-12-09T16:27:32+00:00,<https://www.scien.cx/2020/12/16/a-git-alias-to-show-a-detailed-git-branch-overview-snippet/>
VANCOUVER
Stefan Judis | Sciencx - » A git alias to show a detailed git branch overview (#snippet). [Internet]. [Accessed 2022-12-09T16:27:32+00:00]. Available from: https://www.scien.cx/2020/12/16/a-git-alias-to-show-a-detailed-git-branch-overview-snippet/
CHICAGO
" » A git alias to show a detailed git branch overview (#snippet)." Stefan Judis | Sciencx - Accessed 2022-12-09T16:27:32+00:00. https://www.scien.cx/2020/12/16/a-git-alias-to-show-a-detailed-git-branch-overview-snippet/
IEEE
" » A git alias to show a detailed git branch overview (#snippet)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2020/12/16/a-git-alias-to-show-a-detailed-git-branch-overview-snippet/. [Accessed: 2022-12-09T16:27:32+00:00]
rf:citation
» A git alias to show a detailed git branch overview (#snippet) | Stefan Judis | Sciencx | https://www.scien.cx/2020/12/16/a-git-alias-to-show-a-detailed-git-branch-overview-snippet/ | 2022-12-09T16:27:32+00:00
https://github.com/addpipe/simple-recorderjs-demo