Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The article <a href="http://hans.fugal.net/blog/2008/11/10/git-push-is-worse-than-worthless" rel="nofollow noreferrer">Git push is worse than worsless</a> has an interesting discussion about a similar issue.</p> <p>One of its solution and conclusion involves:</p> <ul> <li>a bare repository on the production server</li> <li>a cloned repository with a hook to pull what has been pushed into the bare one</li> </ul> <p>So in your case, </p> <ul> <li>one bare repo on which you can push beta and release branches</li> <li>two cloned repo 'beta' and 'release' with a hook to pull their respective branches from the bare repo.</li> </ul> <p>In short: one step: <code>git push</code>. No more link to manage (since the directory no longer represent a branch in Git, unlike SVN)</p> <hr> <p>Regarding the hook part, a <a href="http://git-scm.com/docs/githooks" rel="nofollow noreferrer">post-receive hook</a> in the bare repo could be all what you need</p> <p>See <a href="http://debuggable.com/posts/git-tip-auto-update-working-tree-via-post-receive-hook:49551efe-6414-4e86-aec6-544f4834cda3" rel="nofollow noreferrer">Git Tip: Auto update working tree via post-receive hook</a></p> <pre><code>$ cd bare $ chmod +x .git/hooks/post-receive with a post-receive hook like #!/bin/sh cd ../../beta env -i git reset --hard cd ../../release env -i git reset --hard </code></pre> <p>Note:</p> <blockquote> <p>the <code>post-receive</code> hook starts out with the <code>GIT_DIR</code> environment variable set to the <code>repo/.git</code> folder, so no matter what path you '<code>cd</code>' into it will always try to run any following git commands there.<br> Fixing this is simply a matter of unsetting the <code>GIT_DIR</code>.</p> </blockquote> <p><a href="http://ubuntuforums.org/showthread.php?t=328579" rel="nofollow noreferrer">'env -i' does just that</a>: it ignores the inherited environment completely and uses only the supplied variables and values.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload