Last active
March 1, 2020 09:31
-
-
Save christophemarois/6dd19ced9fa18f587c5f7f834117691b to your computer and use it in GitHub Desktop.
Push to a remote non-bare git directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on the remote | |
mkdir my-repo | |
cd my-repo | |
git init | |
git config receive.denyCurrentBranch updateInstead | |
# on the local | |
git remote add [remote-name] ssh://[ssh profile name]/[path to repo on the remote] | |
git push [remote-name] master | |
# Also relevant | |
# https://superuser.com/questions/232373/how-to-tell-git-which-private-key-to-use | |
# https://stackoverflow.com/questions/4565700/specify-private-ssh-key-to-use-when-executing-shell-command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2020 yolo update:
deploy.sh