title: Fixing shared part of code during feature development using GIT
body: <p>I have the following problem.
  Let's say I have <em>dev</em> branch of my solution. One day I come up with an idea to develop some new feature. So I create a new branch <em>feature/my-new-feature</em> from <em>dev</em>. During development of this feature I realize that it would be much easier to  create it (and also code would be generally better) if I refactor (maybe significantly) some shared services/classes or even interfaces.</p>
  
  <p>What would you recommend to do in such case?</p>
  
  <p>Yesterday I had such moment and I started to do these significant changes on my <em>feature/my-new-feature</em> branch. Unfortunately it was not the only feature branch that I had. After some rebasing, merging, duct-taping my repository became quite messy. Well, code works, but my commit history and branches graph... to be honest, even I don't know what is going on there.</p>
  
  <p>If you find time to answer, please do it with examples of git commands. I'm not very proficient with git. Yesterday a few times I was surprised by results of my git actions.</p>