post-commit-hook

How to automatically push after committing in git?

痴心易碎 提交于 2019-11-26 10:14:57
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 (

How to automatically push after committing in git?

北城以北 提交于 2019-11-26 01:57:22
问题 How do I set git to automatically push to a remote repo (including automatically providing my passphrase) after each commit to the local repo? 回答1: 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