title: Updating Git submodule without losing my code
body: <p>I'm new to Git and now I'm in this situation:</p>
  
  <p>I am a Computer Science Student and now we have one git repository (which is on GitLab) from my university and in that "main" repository we are getting every 2 weeks a new project (we just need to finish the code). The projects are submodules in the main repository. The professor is updating the main repository every 2 weeks with a new project (submodule). </p>
  
  <p>With <code>git pull</code> I can update the main repository and with <code>git submodule update --init --recursive</code> I can update my submodules. If a new project is already in my main repository and I am working on it, a professor can for example update the <code>master</code> branch of that submodule again (bugfixes or similar).</p>
  
  <p>What would be the best solution to update that <code>master</code> branch and submodule (if my code is almost complete) without losing my code. 
  I read something that I can make a new local branch and work on it and if an update comes I can easily merge my changes and that "bugfix" on <code>master</code>. But isn't that a merge conflict? I hope you understood me.</p>