title: Web Development Workflow
body: <p>It is definitely time for me to learn about source control, and git in particular.  </p>
  
  <p>I do a lot of web development and most of the time I do a lot of development work on the live production server.  I know this is really bad.  </p>
  
  <p>I just haven't quite got my head around how local development and then deploying to a live site with git works.  </p>
  
  <p>Is the following how it might work out:</p>
  
  <ol>
  <li><p>Set up an environment on my local machine that is as close to my web server as possible</p></li>
  <li><p>Create a git folder where I will develop my project (or download the existing project from the live server).</p></li>
  <li><p>When I'm ready to push my changes commit them in git.</p></li>
  </ol>
  
  <p>What I'm not sure about is the following:</p>
  
  <ul>
  <li>How to push my changes out to the live server?</li>
  <li>What if I accidentally delete my local copy?</li>
  <li>What about my database?  If I add new tables and data on my local machine will I need to manually make these changes on my live server too?</li>
  </ul>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>Yes, sorry, not enough detail. </p>
  
  <p>I do all my coding in Coda for Mac, I have a few different projects on the go, but most of these are PHP/YII running on Apache.  Database of choice is MySQL. </p>
  
  <p>PHP is going out raw. </p>