-
Notifications
You must be signed in to change notification settings - Fork 0
Config
alias main='git switch main && git pull'
alias rebase='git fetch && git rebase origin/main'
For Windows or Linux users, a possible solution is described on GitHub Docs, which I report below for your convenience.
You can run ssh-agent automatically when you open bash or Git shell. Copy the following lines and paste them into your ~/.profile or ~/.bashrc file:
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=$(ssh-add -l >| /dev/null 2>&1; echo $?)
if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then agent_start ssh-add elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then ssh-add fi
source https://stackoverflow.com/questions/10032461/git-keeps-asking-me-for-my-ssh-key-passphrase