Fritz Meissner Fritz Meissner - 1 year ago 160
Git Question

Git for Windows: .bashrc or equivalent config files for Git Bash shell

I've just installed

for Windows and delighted to see that it installs

I want to customise the shell in the same way I can under Linux (e.g. set up aliases like
ls -l
), but I can't seem to find
or equivalent config.

What should I be editing?

Answer Source

Create a .bashrc file under ~/.bashrc and away you go. Similarly for ~/.gitconfig.

~ is usually your C:\Users\<your user name> folder. Typing echo ~ in the git bash terminal will tell you what that folder is.

If you can't create the file (e.g. running Windows), run the below command:

copy > ~/.bashrc

The window will output an error message (command not found) but the file will be created and ready for you to edit.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download