title: Specific git branches for aws elastic beanstalk environments
body: <p><strong>Here is my current scenario.</strong></p>
  
  <ul>
  <li>I am using AWS Elasticbeanstalk along with the eb cli 3.x tools for deployment.</li>
  <li>I have created 2 environments (development and production). and one branch in my git repo for each environment (i.e. master , production)</li>
  <li>I have created .ebextensions and .elasticbeanstalk folders in my git    repo</li>
  <li>the .ebextensions folder has config files that are specific to each environment <em>(e.g. setups, files changes, environment variables . . etc)</em></li>
  </ul>
  
  <p>I wish to work on each environment in its own git branch.</p>
  
  <p><strong>My difficulty</strong></p>
  
  <p>if i have to deploy to development env, it gets really simple</p>
  
  <pre><code>// make config changes in master branch
  // git add, commit
  // eb deploy
  // thus development environment is updated
  </code></pre>
  
  <p>But if i have to deploy to production is where the problem begins</p>
  
  <pre><code>git checkout production
  git merge master // pulls config that is meant for development environment only
  eb deploy 
  </code></pre>
  
  <p>I want that when i merge changes from the master branch, all my code updates with the latest changes. But the .ebextensions and .elasticbeanstalk directories remain untouched</p>
  
  <p>How do tell git to ignore the whole .ebextensions folder while merging into production branch ?</p>