Git Command Aliases

By eric

This is kind of a tip of the day, but I just think its cool so I am sharing it with everyone. And being a recent convert to Git and the fact that I have to use Subversion at my place of work, I find myself constantly doing things like this out of habit.

1
$ git st  && git ci

Well now I can do that (although it may not be a good idea) with git alias:

1
2
3
4
5
elubow@beacon (master) supportskydivers$ git config --global alias.st status
elubow@beacon (master) supportskydivers$ git config --global alias.ci commit
elubow@beacon (master) supportskydivers$ git st && git ci
# On branch master
nothing to commit (working directory clean)

Now st and ci are git aliases for status and commit respectively.

Follow My Travels

Buy My Book

Archives

  • 2020
  • 2019
  • 2017
  • 2014
  • 2013
  • 2012
  • 2011
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006

New Posts By Email

writing