As msysgit uses a bash shell, you can set really handy aliases for the different git commands. For example gs instead of git status and ga instead of git add are the ones I use the most. Check out the great Git Immersion tutorial from Edgecase for a list of aliases. I can also recommend creating the got and get aliases. It’s amazing how often I write got instead of git.
Using the bash shell can be unfamiliar to a Windows user. So if you want to set aliases in msysgit it is not very obvious where they should go. They could go into the .bashrc file or the bash_profile file. From a linux perspective the bash_profile configuration file is executed when logging in while the .bashrc file is executed every time a bash shell window is opened. The .bashrc file is located in the c:\Users\YourUsername directory and the bash_profile file is in the etc directory. In the case of msysgit I fail to see that there is any real practical difference; both are executed when you start up msysgit. So I just used .bashrc and it works great.
If there is no file named .bashrc then you’ll have to create it. Windows 7 will not allow you to create a file with a dot (period) as the first character in the filename and with no extension. So the easy way to do this is to name your file .bashrc. (with an extra dot at the end) and Windows will automatically rename the file to just .bashrc (with no dot at the end).
My .bashrc file (almost identical to the Git Immersion profile file that is linked above):
alias less='less -r' # --show-control-chars: help showing Korean or accented characters alias ls='ls -F --color --show-control-chars' alias ll='ls -l' alias gs='git status ' alias ga='git add ' alias gb='git branch ' alias gc='git commit' alias gd='git diff' alias go='git checkout ' alias gk='gitk --all&' alias gx='gitx --all' alias got='git ' alias get='git '
- Git for Windows tip: setting an editor (danlimerick.wordpress.com)