Last active
April 29, 2016 05:18
-
-
Save jjones646/d80561c7fdc260bd4611d6e55057d5e4 to your computer and use it in GitHub Desktop.
Basic shell script to set a few global git configurations for easier log filtering. After running, use the `git graph` command for viewing a repository's merge history.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# git-tweaks.sh | |
# Setup a slick default 'git log' display | |
git config --global log.date relative | |
git config --global log.abbrevCommit true | |
git config --global format.pretty 'format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset"' | |
# Alias for 'git graph' since log.graph isn't a valid config | |
git config --global alias.graph "log --graph" | |
# Use .mailmap name author mappings when found in root of a repo | |
git config --global log.mailmap true | |
# Show the config values | |
git config --list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment