0

I need to run a pre-defined function(containing git commands) just after GitBash is started and .gitconfig file is loaded and it's global config values are set, so that during execution of this pre-defined custom function, the Git Authentication errors are not encountered.

How can I achieve that ? Not very familiar with Bash events and loading sequence..

Git for Windows version 2.20.1 - Windows 7 x64.

Vicky Dev
  • 1,893
  • 2
  • 27
  • 62

1 Answers1

2

To the best of my knowledge, .gitconfig is not loaded when bash starts (it's loaded every time a git process starts, for sure, but not bash). If you want to define custom commands and stuff to be available on bash, the best place to do it is to use ~/.bash_profile to define them. Git for Windows: .bashrc or equivalent configuration files for Git Bash shell

eftshift0
  • 26,375
  • 3
  • 36
  • 60