Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git Aliases
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
@nickytonline

This comment has been minimized.

Show comment
Hide comment
@nickytonline
Owner

nickytonline commented Sep 10, 2016

@wesbos has some good ones he posted here, http://wesbos.com/git-hot-tips/

@nickytonline

This comment has been minimized.

Show comment
Hide comment
@nickytonline

nickytonline Sep 29, 2016

I always forget the command for creating an alias so adding this one alias = "!sh -c \"git config --global alias.$1 $2\" -"

Owner

nickytonline commented Sep 29, 2016

I always forget the command for creating an alias so adding this one alias = "!sh -c \"git config --global alias.$1 $2\" -"

@nickytonline

This comment has been minimized.

Show comment
Hide comment
@nickytonline

nickytonline Sep 30, 2016

Not aliases, but a nice companion to aliases is TJ's git-extras, https://github.com/tj/git-extras

Owner

nickytonline commented Sep 30, 2016

Not aliases, but a nice companion to aliases is TJ's git-extras, https://github.com/tj/git-extras

@nickytonline

This comment has been minimized.

Show comment
Hide comment
@nickytonline

nickytonline Oct 3, 2016

I also use zsh with Oh My zsh, https://github.com/robbyrussell/oh-my-zsh. glog is great.

Owner

nickytonline commented Oct 3, 2016

I also use zsh with Oh My zsh, https://github.com/robbyrussell/oh-my-zsh. glog is great.

@nickytonline

This comment has been minimized.

Show comment
Hide comment
@nickytonline
Owner

nickytonline commented Feb 17, 2017

This is a good one too https://gist.github.com/gnarf/5406589

@nickytonline

This comment has been minimized.

Show comment
Hide comment
@nickytonline

nickytonline Feb 22, 2017

Here's one to rename a local branch as I never remember the syntax: renb = branch -m

Owner

nickytonline commented Feb 22, 2017

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