Loading Start Scripts for GitBash on Windows

I use GitBash as my shell on Windows. Below are the scripts I normally load including git ssh agent.

# ~/.bash_profile
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
test -f ~/.bash_aliases && . ~/.bash_aliases
# ~/.bashrc
env=~/.ssh/agent.env

agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }

agent_start () {
    (umask 077; ssh-agent >| "$env")
    . "$env" >| /dev/null ; }

agent_load_env

# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)

if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
    agent_start
    ssh-add ~/.ssh/id_rsa_git
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then
    ssh-add ~/.ssh/id_rsa_git
fi

unset env
# ~/.ssh/agent.env
SSH_AUTH_SOCK=/c/Users/Public/Documents/Wondershare/CreatorTemp/ssh-VmJtrCgHYMK8/agent.12228; export SSH_AUTH_SOCK;
SSH_AGENT_PID=9836; export SSH_AGENT_PID;
echo Agent pid 9836;
# ~/.bash_aliases
alias ga="git add"
alias gaa="git add ."
alias gc="git commit -m"
alias gs="git status"