title: Nothing to commit - Git
body: <p>I have created a new repository on github for a project, cloned it and pushed 2 files: README.md and main.c.</p>
  
  <p>But for some reason every time I try to use</p>
  
  <pre><code> git status
  </code></pre>
  
  <p>or</p>
  
  <pre><code>git add .
  </code></pre>
  
  <p>to commit changes, I get the following message</p>
  
  <pre><code># On branch master
  nothing to commit (working directory clean)
  </code></pre>
  
  <p>So I can't push anything and the only workaround solution that works is</p>
  
  <pre><code>rm -rf .git
  git init
  git remote add origin &lt;repo&gt;
  </code></pre>
  
  <p>and force pushing the files. After I push the changes it goes back to the 'nothing to commit' message,so I have to reinitialise every time I want to commit.</p>
  
  <p>This problem occurs even when I try to reclone the repository.</p>
  
  <p>I've looked around for solutions, it seems that .gitignore can sometimes cause similar issues but I don't have a .gitignore file in the repo.</p>