Last Updated: May 30, 2022
·
1.255K
· btv

Favorite Git Aliases

put these little pieces of magic inside you .gitconfig file:

[alias]
     master = checkout master
     rollback = reset --hard HEAD@{1}

<shameless plug>
You can read more about my git rollback alias here: http://scrollingtext.org/git-rollback

6 Responses
Add your response

awesome alias, thanks for sharing

over 1 year ago ·

Smart! Thanks for sharing!

over 1 year ago ·

Great! Some of my favorites:

[alias]
st = status -sb
wat = whatchanged -p --abbrev-commit --pretty=medium
graph = log --graph --date-order -C -M --pretty=format:'<%h> %ad [%an] %Cgreen%d%Creset %s' --all --date=short

Obs: git wat you need to inform file. For example, to see all changes in Readme.md file:
$ git wat Readme.md

over 1 year ago ·

@rogerleite love that wat alias, thanks

over 1 year ago ·

@rogerleite Those are some awesome aliases too. Thank you for sharing them!

over 1 year ago ·

@mdeiters @hlegius @design48 @btv Glad to be helpful! :D

over 1 year ago ·