git - remote: fatal: you are on a branch yet to be born, using post-receive hook

后端 未结 2 1175
你的背包
你的背包 2021-01-26 22:52

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 th

2条回答
  •  滥情空心
    2021-01-26 23:11

    • Fetch all repository:

      $ git remote add live_beta ssh://wesley@tinyweatherstation.com/var/www/tinyweatherstation.com.git
      $ git fetch --all
      
    • Create and checkout to beta branch with remote's beta branch history ( make sure no local beta branch exists):

      $ git checkout beta
      
    • Push to live_beta repo's beta branch:

      $ git push live_beta beta
      

提交回复
热议问题