Skip to content

Instantly share code, notes, and snippets.

@OMMHOA
Created November 17, 2022 13:49
Show Gist options
  • Save OMMHOA/323552b2123f801cf0ffdb8a36e5a724 to your computer and use it in GitHub Desktop.
Save OMMHOA/323552b2123f801cf0ffdb8a36e5a724 to your computer and use it in GitHub Desktop.
Git aliases
[alias]
s = status
bd = branch -D
fp = push -f origin HEAD
p = push origin HEAD
ce = commit --allow-empty
cf = commit --allow-empty --no-verify
cep = !git ce && git p
cp = !git commit && git p
ca = commit --amend --no-edit
rh = reset --hard HEAD^
cafp = !git ca && git fp
capur = !git ca && git pur
ch = checkout
chbut = !git fetch && git checkout -b $1 && git branch --set-upstream-to=origin/master
chm = checkout master
pur = pull --rebase
purp = !git pur && git p
purfp = !git pur && git fp
capurfp = !git ca && git pur && git fp
cpurfp = !git commit && git pur && git fp
cpurp = !git commit && git pur && git p
fmm = !git fetch && git merge origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment