Skip to content

Instantly share code, notes, and snippets.

@carolynvs
Last active October 19, 2022 14:44
Show Gist options
  • Star 51 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save carolynvs/c9357f45b6230cc8c3b302e83e3961a0 to your computer and use it in GitHub Desktop.
Save carolynvs/c9357f45b6230cc8c3b302e83e3961a0 to your computer and use it in GitHub Desktop.
git wip - Show what branches you have been working on lately
[alias]
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
@carolynvs
Copy link
Author

Screen Shot 2020-12-02 at 1 29 45 PM

@mattmoor
Copy link

mattmoor commented Dec 7, 2020

This is awesome, and I can already tell it's going to become a regular part of my workflow 🤩

My first time invoking it though, it scrolled off my screen 😅

I tweaked it to cap the number of entries with:

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

This also reverses the order (so --count works properly). Thanks for sharing this!

@pedromorgan
Copy link

I am more focused and don't not so many branches.. only this-week and next-week and later for me,, ;-)

@anto-acube
Copy link

I added the --no-merged option to get what is really a wip :)

@carolynvs
Copy link
Author

Thanks, --no-merged is a good addition! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment