Git Aliases Simple aliases


There are two ways of creating aliases in Git:

  • with the ~/.gitconfig file:
    ci = commit
    st = status
    co = checkout
  • with the command line:
 git config --global "commit"
 git config --global "status"
 git config --global "checkout"

After the alias is created - type:

  • git ci instead of git commit,
  • git st instead of git status,
  • git co instead of git checkout.

As with regular git commands, aliases can be used beside arguments. For example:

 git ci -m "Commit message..."
 git co -b feature-42