Skip to content

Instantly share code, notes, and snippets.

@paxcodes
Last active August 4, 2023 16:06
Show Gist options
  • Save paxcodes/12a66b210804957d7e15cfb6e240f822 to your computer and use it in GitHub Desktop.
Save paxcodes/12a66b210804957d7e15cfb6e240f822 to your computer and use it in GitHub Desktop.
Git Aliases
[alias]
co = checkout
nb = checkout -b
b = branch
mg = merge
mgnf = merge --no-ff
amend = commit --amend
c = commit
cm = commit -m
cam = commit . -m
cmnv = "!f() { git commit -m \"$1\" --no-verify; }; f"
camnv = "!f() { git commit . -m \"$1\" --no-verify; }; f"
camlog = commit -m "Update changelogs"
undo = reset HEAD~1
reuse-msg = commit -C HEAD@{1}
s = stash
unstash = stash pop
unstage = reset HEAD --
f = "!f() { git fetch -p && git pull; }; f"
remotes = remote -v
ph = push
pf = push --force-with-lease
pl = pull
st = status
w = whatchanged
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
[color]
branch = auto
diff = auto
interactive = auto
status = auto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment