Faster Development by using .bashrc and how to create an alias
This tutorial will show you how to create an alias in Git Bash. This will save you time during you development processes. Download, install and run Git Bash Go to your home directory by entering:$ cd
Create a .bashrc file
$ touch .bashrc
Edit the file using vim, once inside press the 'Insert' key
$ vim .bashrc
Add as many aliases as you like on separate lines. For example
#alias [name]='[command]'
alias mb='cd C: && cd xampp/htdocs'
Now when I type 'mb' into Git Bash it will run this code for me and no matter where I am will return me to my C: drive then go into my htdocs.
This can be used for Git Commands e.g.
#Run git add . when you enter ga
alias ga='git add .'
#Run git pull origin master when you type gp.
alias gp='git pull origin master'
This can be used for Vue.js Commands e.g.
#Run gulp --production
alias gpr='gulp --production'
Categories: Posts