title: How to detect differences between a local repository and remote repository in Git
body: <p>Say I did a Git clone from a URL for a repository. I made some changes to a file, did a Git commit.</p>
  <p>When I do a <code>git pull</code>, I see that it says &quot;Already up-to-date&quot;.</p>
  <p>Shouldn't it show something that says I am not up to date?</p>
  <p>My question is:</p>
  <ol>
  <li><p>say I did the change above to my local repository, but do not commit for two days, but before the two days are up, someone else had made a change to the remote repository. What steps must I do to ensure I am not overriding changes in the remote repository or at least be able to pull the latest changes before committing?</p>
  </li>
  <li><p>Is there some way to diff between my local repository and the remote repository to check what differences there are? (in case I just want to recall what I had before?)</p>
  </li>
  </ol>