Using below procedure, you shall be able to setup SSH-Agent to run automatically whenever GitBash is launched on Windows. The ssh-agent process will continue to run until you log out, shut down your computer, or kill the process. Also you may need to add your SSH keys separately unless already loaded or available as per your config.
However the main advantage is that no duplicate SSH-Agent process will be created for successive / multiple Gitbash sessions.
The automatic ssh-agent launch can be implemented in two ways i.e
- By using '$HOME/.bashrc' in this case it applies to your default bash shell/linux terminal (Method A : Bullet A1-A4)