How to automatically push after committing in git?
How do I set git to automatically push to a remote repo (including automatically providing my passphrase) after each commit to the local repo? Mark Longair First, make sure that you can push manually without providing your password. If you are pushing over HTTP or HTTPS, that will be a case of either creating a .netrc file with the login details or adding your username and password into the URL for the remote . If you're using SSH, you can either create a keypair where the private key doesn't have a password, or use ssh-agent to cache your private key . Then you should create an executable (