Create alias Git Bash Windows 10

Try this:

  1. Open the bash terminal
  2. cd ~
  3. vi .bashrc
  4. press i to go edit mode and update it with you alias command.
  5. press Esc and press :wq(save and exit)
  6. now close and reopen the bash terminal
  7. 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

Tags:

Git

Bash