title: Elastic Beanstalk: Deploy branch to env
body: <p>I'm considering migration for custom hosted Rails app to Elastic Beanstalk.</p>
  
  <p>I've create a simple Rails app and manage to deploy it to on Elastic beanstalk. There are still a few thing I still didn't manage to get:</p>
  
  <ol>
  <li>How can I deploy a branch or a specific code to my app?</li>
  <li>Is the deployed version is from last commit or my current workspace?</li>
  <li>What are the best practices when handling deployment on Beanstalk?</li>
  </ol>
  
  <p>Amazon have this document (<a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-branch-environment.html" rel="nofollow">link</a>) but it seems to be deprecated and I can't figure how to do it on current version</p>
  
  <p><code>
  elad:...$ eb --version
  EB CLI 3.7 (Python 2.7.1)
  </code></p>