Skip to content

Instantly share code, notes, and snippets.

@dehuszar
Created February 25, 2020 20:43
Show Gist options
  • Save dehuszar/1c5299eab600ade0292de5ee534ed2d8 to your computer and use it in GitHub Desktop.
Save dehuszar/1c5299eab600ade0292de5ee534ed2d8 to your computer and use it in GitHub Desktop.
default gitignore file; place in home folder
[user]
name = Your Name
email = your.name@domain.com
[push]
default = current
[alias]
# pretty git log
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
undo = !git reset --soft HEAD~1 # undoes a commit (only on local) and stages changes
co = checkout
st = status
resetDev = !git tag development -f && git push --tags -f
purgeMerged = !git branch --merged origin/master | grep -v master | xargs -n 1 git branch -d
# nifty memory config for rebases
[rerere]
enabled = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment