git_aliases

This is an old revision of the document!


Proper definition and usage of Git aliases.

How to set a regular Git alias (note the need for quotes with multi-word values):

$ git config --global alias.a add
$ git config --global alias.cm commit
$ git config --global alias.co checkout
$ git config --global alias.b branch
$ git config --global alias.cb "checkout -b"

after which you can use Git commands like:

$ git a Makefile
$ git cm
$ git cb newbranch
$ git alias bu "!git rev-parse --abbrev-ref --symbolic-full-name "@{u}""
  • git_aliases.1550411990.txt.gz
  • Last modified: 2019/02/17 13:59
  • by rpjday