I have my aliases in ~/.bash_aliases
I used to run ubuntu and these aliases automatically worked from startup.
Now when I switched to windows and started to use Git Bash, I have to use
source ~/.bash_aliases
or
. ~/.bash_aliases
to get them to be recognized by the bash
How can I get them to work without using this command every time I open bash?
I think it's something i have to do in the ~/.bashrc
Yeah, you're right! To configure bash aliases, you can put them in
.bashrcfile in your home directory. For instance:Next, you need to either source this file (i.e. run source
.bashrc) or restart to your terminal to take this changes into effect.If you have an aliases.sh file (an equivalent for
.bashrcfile) available inC:\Users\<username>\AppData\Local\GitHub\PortableGit_\etc\profile.d\aliases.shor underC:\Program Files\Git\etc\profile.d\aliases.sh, you can make use of that file too.