Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit refs shown with git log --decorate

Tags:

git

git-log

I have 3 standard remotes for a the main repository I work in currently: a local backup, my development partner's workstation, and a hosted repository. We have 3 or 4 branches that are active most of the time, one being master.

I monitor the branches on a regular basis throughout the day using:

git log --graph --oneline --decorate -15 my-branch his-repo/his-branch master other-branch

--decorate is crucial because it lets me know the state of things in regards to our very volatile development branches. The problem is that I see all of the remote refs and all of the branches, tags, etc. in the decoration.

Is there any way to limit --decorate to only output certain refs? Listing the refs on the command line only limits the commits shown, not the refs shown.

Thanks, Mike

like image 501
MikeJansen Avatar asked Feb 20 '12 19:02

MikeJansen


1 Answers

You cannot limit this out-of-the box. But nothing is stopping you from scripting the manipulation of .git/refs and then restoring it right after :).

like image 71
Adam Dymitruk Avatar answered Sep 30 '22 01:09

Adam Dymitruk