Created
August 25, 2020 06:35
-
-
Save pfandie/adca674f3e1472f9fec29301ab43045f to your computer and use it in GitHub Desktop.
gitconfig containing some helpful git commands (like pretty log output)
This file contains 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
[user] | |
name = My git Username | |
email = my_email_address@example.com | |
[mergetool] | |
keepBackup = true | |
[branch] | |
autosetuprebase = remote | |
autosetupmerge = true | |
[advice] | |
pushNonFastForward = false | |
statusHints = false | |
[alias] | |
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit | |
amend = commit --amend -C HEAD | |
showme = show --pretty="format:" --name-only | |
rs = reset --hard origin/master | |
sub = submodule foreach 'git rs && git checkout master && git pull' | |
p = !git pull && git submodule update --init --recursive | |
sp = !git stash && git p && git stash pop | |
pp = !git p && git push | |
st = status | |
ls = ls-files | |
save = !git stash save $(date "+%F_%T") | |
b-ls = for-each-ref --sort=-committerdate --format='%(committerdate) %(authorname) %(refname)' refs/remotes/origin/ | |
# Show files ignored by git | |
ign = ls-files -o -i --exclude-standard | |
d = difftool | |
m = mergetool | |
[merge] | |
# Always show a diffstat at the end of a merge | |
stat = true | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
interactive = auto | |
ui = true | |
pager = true | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
whitespace = red reverse | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
[core] | |
pager = less -FRSX | |
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
editor = vim | |
filemode = true | |
ignorecase = false | |
excludefile = $HOME/.gitignore_global | |
excludesfile = $HOME/.gitignore_global | |
[apply] | |
whitespace = fix | |
[push] | |
default = current | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[commit] | |
template = $HOME/.stCommitMsg | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment