Skip to content

Instantly share code, notes, and snippets.

@cessor
Last active June 24, 2018 06:34
Show Gist options
  • Select an option

  • Save cessor/47940ebd01db94e3842c94e6bee4bcb9 to your computer and use it in GitHub Desktop.

Select an option

Save cessor/47940ebd01db94e3842c94e6bee4bcb9 to your computer and use it in GitHub Desktop.
.gitconfig
# git config --global alias.<alias> <command>
# https://github.com/cessor/howtolinux/blob/master/git.md
# https://git-scm.com/docs/pretty-formats
[alias]
st = status -s
addrem = add . -A
summary = log --oneline
sum = log --oneline
tl = log --oneline --all --graph --pretty=format:'%C(yellow)%h%Creset - %C(cyan)%cr%Creset [%C(green)%an%Creset] - %Cred%d%Creset %s' --abbrev-commit --date=relative
tree = !git tl
ls = log --all --pretty='format:%C(yellow)%h%Creset %C(cyan)%ci%C(reset) [%C(green)%cn%Creset]: %Cred%d%Creset %s'
lr = log --all --pretty='format:%C(yellow)%h%Creset %C(cyan)%crC(reset) [%C(green)%cn%Creset]: %Cred%d%Creset %s'
path = remote -v
shrine = "!curl -s -O https://shrine.duckdns.org/shrine.txt; git commit -F shrine.txt; rm shrine.txt"
see = "!git show HEAD^:$1"
rollback = reset --hard HEAD~1
ignorepython = "!curl 'https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore' -o .gitignore"
[user]
email = <email>
name = <name>
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment