Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Update January 2012:</p> <p><a href="https://stackoverflow.com/users/6486/jon">Jon</a> mentions in the comments that <a href="http://www.jetbrains.com/teamcity/whatsnew/" rel="nofollow noreferrer">TeamCity version 6.5.6</a> has great intergration for Git, which would render the hooks I suggests below not needed.</p> <p>It includes for instance:</p> <p><strong>Personal Builds on branches for Git and Mercurial</strong></p> <blockquote> <p>TeamCity 6.5 provides a more natural way to start Personal Builds on server with distributed version controls.</p> </blockquote> <p><img src="https://i.stack.imgur.com/BtAPS.png" alt="personal build change"></p> <hr> <p>Original answer November 2010</p> <p>You can setup two repositories:</p> <ul> <li>one bare, where your team ushes to</li> <li>one non-bare</li> </ul> <p>On the bare one, add a <a href="http://toroid.org/ams/git-website-howto" rel="nofollow noreferrer">post-update hook</a> which will:</p> <ul> <li>go to the non-bare repo</li> <li>make a pull</li> </ul> <p>post-update hook:</p> <pre><code>#!/bin/sh cd /path/to/non-bare/repo &amp;&amp; unset GIT_DIR git fetch origin git reset --hard origin/master </code></pre> <p><a href="http://toroid.org/ams/git-website-howto" rel="nofollow noreferrer">This article</a> suggests another approach (non-bare repo with a <code>checkout -f</code> on a post-receive hook)</p> <p>The general idea remains to update a non-bare repo, in order for your TeamCity instance to work on that set of files.</p>
 

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