Skip to content

Instantly share code, notes, and snippets.

@phproberto
Last active February 4, 2022 15:23
Show Gist options
  • Save phproberto/5066462 to your computer and use it in GitHub Desktop.
Save phproberto/5066462 to your computer and use it in GitHub Desktop.
My git config file
[color]
status = auto
diff = auto
branch = auto
interactive = auto
ui = true
[alias]
amend = !"git commit --amend -C HEAD"
st = status
ci = commit
co = checkout
br = branch
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
sm = log --summary
pp = push produccion +master:refs/heads/master
# hard reset
rshard = reset --hard HEAD
# undo last commit keeping files in stage
undolast = reset --soft HEAD^
untracked = ls-files . --exclude-standard --others
ignored = ls-files . --ignored --exclude-standard --others
# unstage file
unstage = reset HEAD
# unstage and remove local changes
discard = checkout HEAD
# show git aliases
aliases = config --get-regexp alias
# list contributor stats for this repo
contributors = !git shortlog -n -s --no-merges $@ | cat - && echo && echo total $(git rev-list --count HEAD)
# decorated graph view of one liner summarized commits from all branches. (inspired by git-extras)
tree = log --all --graph --decorate --oneline --simplify-by-decoration
[user]
name = Roberto - phproberto
email = roberto@phproberto.com
[core]
excludesfile = ~/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment