Last active
February 17, 2021 03:34
-
-
Save nickytonline/128d7d164d1eea5daba6753ed0829f41 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 . | |
alias.aliases config --get-regexp alias | |
alias.bi bisect | |
alias.ci commit -m | |
alias.co checkout | |
alias.colast checkout - | |
alias.db branch -D | |
alias.laf fsck --lost-found | |
alias.last log -1 HEAD | |
alias.nb checkout -b | |
alias.pror remote prune origin | |
alias.pr pull --rebase | |
alias.pf push --force-with-lease | |
alias.psu push --set-upstream | |
alias.ra rebase --abort | |
alias.rc rebase --continue | |
alias.remotes remote -v | |
alias.renb branch -m | |
alias.rhh reset --hard HEAD | |
alias.rh reset --hard | |
alias.s status -s | |
alias.stashes stash list | |
alias.unstash stash pop | |
alias.vc clean -dfx | |
alias.refactor commit -m 👷Refactor | |
alias.formatting commit -m 💅Formatting | |
alias.comments commit -m 📒Comments | |
alias.tests commit -m ✅Tests | |
alias.prum pull --rebase upstream master | |
alias.mend commit --amend |
I always forget the command for creating an alias so adding this one alias = "!sh -c \"git config --global alias.$1 $2\" -"
Not aliases, but a nice companion to aliases is TJ's git-extras, https://github.com/tj/git-extras
I also use zsh with Oh My zsh, https://github.com/robbyrussell/oh-my-zsh. glog
is great.
This is a good one too https://gist.github.com/gnarf/5406589
Here's one to rename a local branch as I never remember the syntax: renb = branch -m
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@wesbos has some good ones he posted here, http://wesbos.com/git-hot-tips/