title: Egit: You are in detached head state. This means that you don't have a local branch checked out
body: <p>I recently created a project on Eclipse. I set up a git repository on the project. Pushed the code to a new repository on GitLab.</p>
  
  <p>I checked out (<code>Import</code>-><code>Project from Git</code>) the project to another laptop, made updates, committed it as another author and pushed it back to repository (2nd commit /revision). I only removed the target runtimes from the project as the changes.</p>
  
  <p>I went to my 1st laptop and wanted to try update / pull my code. I right-clicked on the repository from the <code>Git Repository</code> view -> <code>Remote</code> -> <code>Fetch</code>. I entered the path to the repository and etc and fetched the repository. But, my project still has the old code having the target runtime. I know I only 'fetched' the repository, not 'pulled' maybe.</p>
  
  <p>So I was confused, the code was <strong>not</strong> updated. If I am not mistaken, I right-clicked the repository again, clicked on 'Check Out'. This was the result :</p>
  
  <p><img src="https://ibin.co/4VQNdhbfwKQf.png" alt="this"></p>
  
  <p><img src="https://ibin.co/4VQOmGPEFWDt.png" alt="viewing the branches also"></p>
  
  <p>After 'Checkin Out', the target runtimes on my project were removed, updated like from the 2nd commit. But there are now 2 branches and 2 refs. I don't what state my local repository is in now. And/but the <code>local</code> <code>master</code> branch was still in 'initial commit', isn't it confusing?.. My code has been updated..</p>
  
  <p>I only read a bit of the git manual online, and I haven't yet be able to wrap my head around concepts like refs.</p>
  
  <p>I could just delete the project and <code>Import</code>-><code>Project from Git</code>, right?</p>
  
  <p>But if I can I would like to know what happened to my project (local repository) and how to fix this?</p>
  
  <p>Thx</p>