Create alias Git Bash Windows 10
Try this:
- Open the bash terminal
- cd ~
- vi .bashrc
- press
i
to go edit mode and update it with you alias command. - press
Esc
and press:wq
(save and exit) - now close and reopen the bash terminal
- check the alias command.
if this didn't work create the .bash_profile
in the same way and add the line
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
you can also open and edit the file aliases.sh that you find in the installation path of git
C:\path where you installed Git\etc\profile.d\aliases.sh
Open it with atom or notepad++ and add a line like
alias MyProjectName='C:/<installation_path_of_your project>/'
and save.
close and reopen git bash
now if you write
MyProjectName
on Bash, it should automatically bring you tothe desired path.
If it doesn't work try with
cd MyProjectName