Last active
November 3, 2021 20:09
-
-
Save pietrofxq/cd75c002dfedc93713b0a554497e58e6 to your computer and use it in GitHub Desktop.
Git aliases
This file contains hidden or 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
[core] | |
editor = code --wait | |
[alias] | |
co = checkout | |
cob = checkout -b | |
com = checkout master | |
coo = !git fetch && git checkout | |
cod = checkout develop | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
rb = rebase | |
rbc = rebase --continue | |
rbi = rebase -i | |
rbm = rebase origin/master | |
rbd = rebase origin/develop | |
merged = branch --merged | |
rhm = reset --hard origin/master | |
dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" | |
st = status | |
ft = fetch | |
aa = add -A . | |
cm = commit -m | |
aacm = !git add -A . && git commit -m | |
cp = cherry-pick | |
ca = commit --amend | |
cano = commit --amend --no-edit | |
acano = !git aa && git commit --amend --no-edit | |
acanf = !git add . && git cano && git pof | |
dev = !git checkout develop && git pull origin develop | |
staging = !git checkout staging && git pull origin staging | |
master = !git checkout master && git pull origin | |
po = push origin | |
pof = push origin --force | |
pod = push origin develop | |
pos = push origin staging | |
pom = push origin master | |
poh = push origin HEAD | |
plo = pull origin | |
plod = pull origin develop | |
plos = pull origin staging | |
plom = pull origin master | |
ploh = pull origin HEAD | |
unstage = reset --soft HEAD^ | |
lg = log --graph --decorate --oneline --abbrev-commit | |
lgd = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --graph | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
f = "!git ls-files | grep -i" | |
gr = grep -Ii | |
la = "!git config -l | grep alias | cut -c 7-" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment