Skip to content

Instantly share code, notes, and snippets.

@jaredreich
Last active January 19, 2022 21:15
Show Gist options
  • Save jaredreich/55868dc357e587585f0f4327ace2d3c9 to your computer and use it in GitHub Desktop.
Save jaredreich/55868dc357e587585f0f4327ace2d3c9 to your computer and use it in GitHub Desktop.
Handy Git Aliases
[alias]
b = branch
bd = branch -D
c = commit -m
co = checkout
cob = checkout -b
p = pull
pune = pull --prune
s = status
undo = reset HEAD^
* TO SET *
git config --global alias.b "branch"
git config --global alias.bd "branch -D"
git config --global alias.c "commit -m"
git config --global alias.co "checkout"
git config --global alias.cob "checkout -b"
git config --global alias.p "pull"
git config --global alias.s "status"
git config --global alias.undo "reset HEAD^"
* TO UNSET ONE *
git config --global --unset alias.aliasname
* TO UNSET ALL *
git config --global --unset-all
* TO LIST *
git config --list | grep alias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment