0

Creating aliases in GIT

This is as much a resource for myself as it is for everyone else.

I wanted to create aliases for my GIT use to save me typing in status, commit, branch, checkout etc each time I wanted to use the command.

To do this I discovered that you can add the following block to your .gitconfig file (usually located in your home directory):

[alias]
  st = status
  ci = commit
  br = branch
  co = checkout
  df = diff
  lg = log -p

Then you can use your commands immediately in the terminal:

A Git alias being used in a terminal window.

A Git alias being used in a terminal window.

Jason Edwards