Last active
April 16, 2024 08:34
-
-
Save zwhitchcox/32293781d1ecd694e0421a0947871392 to your computer and use it in GitHub Desktop.
git aliases
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
[alias] | |
a = add | |
aa = add --all | |
d = diff | |
dc = diff --cached | |
pl = pull | |
pu = push | |
puf = push --force | |
puom = push -u origin master | |
s = status | |
co = checkout | |
cob = checkout -b | |
com = checkout master | |
amend = commit --amend --no-edit | |
ca = commit -a | |
cam = commit -a -m | |
cm = commit -m | |
rb = rebase | |
rba = rebase --abort | |
rbc = rebase --continue | |
rbi = rebase --interactive | |
rbs = rebase --skip | |
r = reset HEAD | |
r1 = reset HEAD^ | |
r2 = reset HEAD^^ | |
rhard = reset --hard | |
rhard1 = reset HEAD^ --hard | |
rhard2 = reset HEAD^^ --hard | |
sd = stash drop | |
spo = stash pop | |
spu = stash push | |
spua = stash push --all | |
lg = log --graph --abbrev-commit --decorate --format=format:'%C(blue)%h%C(reset) - %C(green)(%ar)%C(reset) %s %C(italic)- %an%C(reset)%C(magenta bold)%d%C(reset)' --all | |
rs = restore --staged | |
add-origin = "!f() { git remote add origin [email protected]:$1; }; f" | |
set-origin = "!f() { git remote rm origin; git remote add origin [email protected]:$1; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment