add upstream push as comment

This commit is contained in:
AJ ONeal 2019-06-01 06:08:19 +00:00
parent 8bdffa8302
commit 2fc2133f99
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ sudo bash -c "cat << EOF > ${my_repo}/hooks/post-receive
#!/usr/bin/env bash #!/usr/bin/env bash
mkdir -p '${my_deploy}' mkdir -p '${my_deploy}'
# always deploys from the default (master) branch # always deploys from the default (master) branch
#git remote add upstream git@example.com:${my_repo}
#git push -u upstream master
#git push --all --force
git --work-tree='${my_deploy}' --git-dir='${my_repo}' checkout -f git --work-tree='${my_deploy}' --git-dir='${my_repo}' checkout -f
echo Deployed branch "'$(git rev-parse --abbrev-ref HEAD)'" to '${my_deploy}' echo Deployed branch "'$(git rev-parse --abbrev-ref HEAD)'" to '${my_deploy}'
EOF EOF