Skip to content

Instantly share code, notes, and snippets.

@bfolliot bfolliot/.gitconfig
Last active Jun 28, 2016

What would you like to do?
Git search
search = "!f() { git log --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%an %cr)%Creset' --abbrev-commit --date=relative --branches --all --grep=$1; }; f"
search-b = "!f() { for i in $(git log --pretty=format:%h --all --grep=$1 --branches); do git log -1 --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%an %cr)%Creset' --abbrev-commit --date=relative $i && git branch -a --contains $i; done }; f"

This comment has been minimized.

Copy link
Owner Author

bfolliot commented Jun 28, 2016

Usages :

$ git search "toto" # Affiche simplement le log des commits qui contiennent toto
$ git search-b "toto" # Affiche le log avec pour chaque commit la liste des branches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.