title: git strategy to have a set of commits limited to a particular branch
body: <p>I need to merge between dev and master frequently.</p>
  
  <p>I also have a commit that I need to apply to dev only, for things to work locally.</p>
  
  <p>Earlier I only merged from dev to master, so I had a branch production_changes that contained the "undo commit" of the dev special commit. and from the master, I merged this. Used to work fine.</p>
  
  <p>Now each time I merge from dev to master and vice versa, I am having to cherry-pick and apply the same commit again and again :(. Which is UGLY.</p>
  
  <p>What strategy can I adapt so that I can seamlessly merge between 2 branches, yet retain some of the changes only on one of those branches?</p>