Skip to content

Instantly share code, notes, and snippets.

@h3h h3h/.gitconfig
Created Dec 11, 2015

Embed
What would you like to do?
Git Config
[alias]
amend = commit --amend
co = checkout
st = status
cp = cherry-pick
# edit config (global, local)
ec = !vim ~/.gitconfig
ecl = !vim .git/config
# log graph
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# rebase interactive (local commits on master)
rbi = rebase -i origin/master
# edit conflicted files
ecf = !$EDITOR $(git ls-conflicted-files)
ls-conflicted-files = ls-files --unmerged
human = name-rev --name-only --refs=refs/heads/*
track = checkout -b $1 -t origin/$1
[color]
status = auto
diff = auto
[color "status"]
added = green
changed = cyan
untracked = yellow
[branch]
autosetupmerge = always
autosetuprebase = always
[clean]
requireForce = false
[push]
default = current
[help]
autocorrect = 1
[rerere]
enabled = 1
[core]
autocrlf = input
excludesfile = ~/.gitignore
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
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.