Skip to content

Instantly share code, notes, and snippets.

@lyoshenka
Last active March 9, 2021 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lyoshenka/2a22d555cbeadef3b5274587f4c198ef to your computer and use it in GitHub Desktop.
Save lyoshenka/2a22d555cbeadef3b5274587f4c198ef to your computer and use it in GitHub Desktop.
current .gitconfig
[color]
diff = auto
status = auto
branch = auto
ui = auto
[core]
autocrlf = input
safecrlf = true
pager = cat
[alias]
git = "!git" # makes "git git git show" work
reste = reset
rest = reset
br = branch -a
cm = commit
cmm = commit -m
acm = !git add -u && git commit -m
edit = commit --amend
amend = commit --amend --no-edit
co = checkout
checkuot = checkout
st = status --short --branch
last = log -1 HEAD
wdf = diff --word-diff --color
pushf = push --force-with-lease
prune = fetch --prune
fetchall = !"for i in $(find . -maxdepth 1 -type d | sort); do (cd "$i"; if git rev-parse > /dev/null 2>&1 && [ -n "$(git remote)" ]; then echo "$i"; git fetch; fi;) ; done"
it = !git init && git commit -m "init" --allow-empty
wip = stash save --include-untracked
unwip = stash pop
k = !gitk --all --date-order &
# http://martin.ankerl.com/2015/12/22/beautiful-git-logs/
l = log --graph --pretty=format:'%C(auto)%h%<(3)%d %s %C(bold blue)(%cr, %an)%Creset' --abbrev-commit --all -n 50
ls = log --graph --pretty=format:'%C(auto)%h%<(3)%d %s %C(bold blue)(%cr, %an)%Creset%n' --abbrev-commit --all --find-copies -M --stat -n 50
[merge]
summary=true
defaultToUpstream = true
[push]
default = simple
followTags = true
[help]
autocorrect = 10
[rerere]
enabled = true
[pull]
rebase = true
[credential]
helper = cache
[rebase]
autoStash = true
autoSquash = true
[status]
showUntrackedFiles = all
[stash]
showPatch = true
[submodule]
recurse = true
[log]
follow = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment