[kwlug-disc] Using the alias command with the Git Command Line Interface

John Johnson jvj at golden.net
Wed Feb 14 10:35:32 EST 2018


Update
A while ago I was informed about the use of alias command.
My Bad: I had forgotten about the alias command, as I used it back when 
was UNIX sysadm, many eons ago.

While my application is not in Linux what I have shown below shows how I 
am using the alias command with the git command window.
The same can apply to Linux.

In the other OS, I have placed .bashrc (shown below) in the git home 
directory /c/Users/user/.
I have a number of projects, each with their own development directory 
and git repository.
In the git command window, I use the alias commands shown below to 
define shortcuts that will put me in the development directory for the 
current project.

# .bashrc
# created 20180211
alias cdprojectA="cd /c/Users/user/projects/projectA"
alias cdprojectB="cd /c/Users/user/projects/projectB"
alias cdprojectC="cd /c/Users/user/projects/projectC"
# done

Next: Study & use the git control files: .gitignore and .ignore.

And yes! At this time, I prefer to use git from the command line window. 
Using the git gui will come later.

JohnJ





More information about the kwlug-disc mailing list