Last active
May 4, 2022 02:02
-
-
Save eufelipe/9031159d954699d15b3e6d0672fa3a42 to your computer and use it in GitHub Desktop.
GIT Alias
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
email = contato@eufelipe.com | |
name = Felipe Rosas | |
signingKey = | |
[commit] | |
gpgSign = true | |
[tag] | |
gpgSign = true | |
[gpg] | |
program = gpg | |
[core] | |
editor = code --wait | |
[alias] | |
visual = !gitk | |
co = checkout | |
lg = log --all --graph --decorate --oneline --abbrev-commit --pretty=format:'%C(blue)%h %C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr' | |
ac = !git add -A && git commit | |
st = status -sb | |
tags = tag -l | |
branches = branch -a | |
remotes = remote -v | |
ec = config --global -e | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
cob = checkout -b | |
cm = !git add -A && git commit -m | |
save = !git add -A && git commit -m 'SAVEPOINT' | |
wip = !git add -u && git commit -m "WIP" | |
undo = reset HEAD~1 --mixed | |
amend = commit -a --amend | |
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard | |
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f" | |
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f" | |
prev = checkout HEAD^1 | |
next = "!sh -c 'git log --reverse --pretty=%H master | awk \"/$(git rev-parse HEAD)/{getline;print}\" | xargs git checkout'" | |
ahead = "!sh -c 'echo branch is $(git rev-list --count origin/master..HEAD) commits ahead master'" | |
behind = "!sh -c 'echo branch is $(git rev-list --count HEAD..origin/master) commits behind master'" | |
tree = ! git ls-tree --full-name --name-only -t -r HEAD | sed -e \"s/[^-][^\\/]*\\// |/g\" -e \"s/|\\([^ ]\\)/|-- \\1/$ | |
[core] | |
excludesfile = ~/.gitignore_global | |
editor = code | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment