Note that there are some explanatory texts on larger screens.

plurals
  1. POGit Workflow With Capistrano
    text
    copied!<p>I'm trying to get my head around a good git workflow using capistrano. I've found a <a href="http://nakedstartup.com/2010/04/simple-daily-git-workflow/" rel="noreferrer">few</a> <a href="http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html" rel="noreferrer">good</a> <a href="http://www.reasonablyopinionated.com/2009/09/git-deployment-workflow-and-capistrano.html" rel="noreferrer">articles</a>, but I'm either not grasping completely what they're suggesting (likely) or they're somewhat lacking.</p> <p>Here's kind of what I had in mind so far, but I get caught up when to merge back into the master branch (i.e. before moving to stage? after?) and trying to hook it into capistrano for deployments:</p> <ol> <li>Make sure you’re up to date with all the changes made on the remote master branch by other developers <ul> <li><code>git checkout master</code></li> <li><code>git pull</code></li> </ul></li> <li>Create a new branch that pertains to the particular bug you're trying to fix <ul> <li><code>git checkout -b bug-fix-branch</code></li> </ul></li> <li>Make your changes <ul> <li><code>git status</code></li> <li><code>git add .</code></li> <li><code>git commit -m "Friendly message about the commit"</code></li> </ul></li> </ol> <p>So, this is usually where I get stuck. At this point, I have a <strong>master</strong> branch that is healthy and a new <strong>bug-fix-branch</strong> that contains my (untested -- other than unit tests) changes.</p> <p>If I want to push my changes to stage (through <code>cap staging deploy</code>), do I have to merge my changes back into the master branch (I'd prefer not to since it seems like master should be kept free of untested code)? Do I even deploy from master (or should I be tagging a release first and then modifying my <code>production.rb</code> file to deploy from that tag)? <a href="https://github.com/apinstein/git-deployment/" rel="noreferrer">git-deployment</a> seems to address some of these workflow issues, but I can't seem to find out how on earth it actually hooks into cap staging deploy and cap production deploy.</p> <p>Thoughts? I assume there's a likely <em>canonical</em> way to do this, but I either <em>can't</em> find it or I'm too new to git to recognize that I <em>have</em> found it.</p> <p>Help!</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