Skip to content

Instantly share code, notes, and snippets.

@igormcsouza
Last active March 17, 2023 13:44
Show Gist options
  • Save igormcsouza/e5ac2f47d31a70b5e9666a35b60db221 to your computer and use it in GitHub Desktop.
Save igormcsouza/e5ac2f47d31a70b5e9666a35b60db221 to your computer and use it in GitHub Desktop.
[merge]
ff = true
[user]
email = [email protected]
name = Igor Souza
[init]
defaultBranch = main
[alias]
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
co = checkout
com = checkout main
st = status -sb
sf = show --name-only
l = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=50
lg = log --oneline --graph
ap = add -p
c = commit
cf = commit --fixup
can = commit --amend --no-edit
pf = push --force
ria = rebase -i --autosquash
ignore = "!sh -c 'echo $@ >> .gitignore' -"
search = "!sh -c 'git rev-list --all | grep ^$1 | while read commit; do git --no-pager log -n1 --pretty=format:\"%H %ci %an %s%n\" $commit; done' -"
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
broom = clean -i -x -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment