title: Git push to Staging Server
body: <p>I'm trying to push only my Staging Branch to a bare repo on my staging server with the following command:</p>
  
  <pre><code>git push staging +staging:refs/heads/staging
  </code></pre>
  
  <p>But I get a fatal error:</p>
  
  <pre><code>you are on a branch yet to be born
  </code></pre>
  
  <p>If I replace staging with master on the command above it works and deploys my master branch/files to the staging server but my master branch is my production branch and I only want to deploy my staging branch/files.</p>
  
  <p>Can anyone help? </p>
  
  <p>Please bear in mind that I am a designer and not a developer, so a newbie styled answer would be appreciated ;o)</p>
  
  <h3>UPDATED</h3>
  
  <p>I thought I'd better explain my workflow... just in case it revels some answers to my issue/newbie situation:</p>
  
  <ul>
  <li>I have my Origin @ Bitbucket - which holds my entire project</li>
  <li>I cloned my repo to my local WAMP server for development (where I work on my develop branch)</li>
  <li>I have three main branches: master (my production branchj / live server), develop (my local branch / WAMP server) and staging (my client acceptance branch / staging  server)</li>
  </ul>
  
  <p>I have no problem pushing the entire project to Bitbucket, but I'm struggling to push the files under the staging branch to my staging server.</p>
  
  <p>NB: on my staging server git I'm using a post-receive hook:
  GIT_WORK_TREE=/path/to/site git checkout -f</p>
  
  <p>I maybe trying to do this completely wrong, but I though I could deploy my code on the staging branch to my staging server?!</p>