Small list of useful Git aliases.
$ wget -qO- http://git.io/git-useful-aliases | sh
Show last commit (HEAD)
$ git config --global alias.last 'log -1 HEAD'
> git last
Show all files of the last commit (HEAD)
$ git config --global alias.latest 'show --name-only --oneline HEAD'
> git latest
Pull all changes from remote branch master with --rebase
option.
$ git config --global alias.down 'pull --rebase origin master'
> git down
Push all changes to remote branch master with --set-upstream
option.
$ git config --global alias.up 'push -u origin master'
> git up
git add
and git commit
for all changes on local branch master.
$ git config --global alias.save '!git add -A; git commit .'
> git save
Push all tags to remote repository.
$ git config --global alias.uptags 'push --follow-tags'
> git uptags
Pull down all tags from remote repository.
$ git config --global alias.downtags 'fetch --tags'
> git downtags
Show log in pretty format.
$ git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
> git lg
Source: https://coderwall.com/p/euwpig/a-better-git-log
Fish Gitnow - Simple and fast commands for your git workflow. 🐠 +
Pull requests and issues are be welcome.
MIT
© 2016 José Luis Quintana