Skip to content

Instantly share code, notes, and snippets.

@lfguerreiro
Last active August 1, 2023 18:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lfguerreiro/2972811 to your computer and use it in GitHub Desktop.
Save lfguerreiro/2972811 to your computer and use it in GitHub Desktop.
.gitconfig
[user]
name = YOUR NAME
email = YOUR EMAIL
[color]
diff = auto
grep = auto
interactive = auto
status = auto
branch = auto
status = auto
[alias]
st = status -sb
ci = commit
br = branch
df = diff
#lg = log -pgit ps
co = checkout
pom = push origin master
ps = push
pl = pull
cm = checkout master
cb = checkout -b
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
unstage = reset HEAD --
undo = checkout --
rollback = reset --soft HEAD~1
lasttag = describe --tags --abbrev=0
cleanup = "!f() { git branch --merged | grep -v "master" | while read i; do git branch -d $i; done; }; f"
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment