title: How to merge and commit to a branch in TeamCity
body: <p>I want to figure out how to integrate TeamCity builds with Springloops deployments.</p>
  
  <p>Lets say I have a Git repo called <code>api</code> that has two branches <code>dev</code> and <code>dev.build</code></p>
  
  <pre><code>api
  |-- dev
  |-- dev.build
  </code></pre>
  
  <p>I have set up TeamCity with a VCS trigger on <code>dev</code> to build upon commit. Which then creates artifacts that I want to use to deploy. (In this case it's an ASP.NET website with various DLLs that I want to use for deployment).</p>
  
  <p>I also have Springloops that I use right now for deployments. Ideally I would like to deploy from <code>dev.build</code>. Is there a way to commit build artifacts from TeamCity to the <code>dev.build</code> branch, and then deploy from that branch?</p>
  
  <p>The basic workflow would be</p>
  
  <ol>
  <li>Commit code to <code>dev</code></li>
  <li>TeamCity merges <code>dev</code> into <code>dev.build</code></li>
  <li>TeamCity builds from <code>dev.build</code></li>
  <li>TeamCity commits artifacts (DLLs) to <code>dev.build</code></li>
  <li>Springloops auto deploys from <code>dev.build</code></li>
  </ol>
  
  <p>I have <a href="https://stackoverflow.com/questions/27738892/git-commit-push-through-teamcity">read arguments against storing build binaries/artifacts in git</a>, but right now I do my deployments from Springloops, and ideally I could keep that setup. I know you can <a href="https://stackoverflow.com/questions/13326487/teamcity-on-successful-build-push-to-git-repo">call <code>git</code> as a command line build step</a>, but I'm having trouble putting all the pieces together. Especially how to merge from <code>dev</code> to <code>dev.build</code> as a TeamCity build step and then use <code>dev.build</code> to build from.</p>
  
  <p>Is this possible at all? Am I thinking about this completely wrong? Do I have other options?</p>
  
  <p><strong>Edit/Update</strong></p>
  
  <p>I've found that it will be smarter to switch to using WebDeploy to deploy TeamCity artifacts (WebDeploy package) instead of committing build artifacts from a git repository via Springloops. I will hopefully stop using Springloops for deployments and deploy directly to my IIS sites via WebDeploy through a TeamCity build task. This way build artifacts (<code>\bin</code> folder) will stay out of git, and <code>web.config</code> transforms can also be used instead of manually making <code>web.config</code> edits on production IIS sites.</p>