So I am trying to sync to github branches to two parts of my website, theoretically the master branch in my github should be synced with my website tinyweatherstation.com and the beta branch should sync with beta.tinyweatherstation.com, and I have successfully gotten the post-receive hook working with the master branch, but when this for the beta branch:
git remote add live_beta ssh://wesley@tinyweatherstation.com/var/www/tinyweatherstation.com.git
git push live_beta +beta:refs/heads/beta
I get the error:
Enter passphrase for key '/c/Users/WesleyN/.ssh/id_rsa':
Counting objects: 999, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (967/967), done.
Writing objects: 100% (999/999), 5.04 MiB | 529.00 KiB/s, done.
Total 999 (delta 360), reused 0 (delta 0)
remote: Resolving deltas: 100% (360/360), done.
remote: fatal: You are on a branch yet to be born
To ssh://tinyweatherstation.com/var/www/beta.tinyweatherstation.com.git
* [new branch] beta -> beta
The post receive hook looks like this...
#!/bin/sh
GIT_WORK_TREE=/var/www/beta.tinyweatherstation.com/html git checkout -f
I have commited to this branch (beta) so I know it is there, so please help...