title: Find the last commit ID of a File in the remote branch
body: <p>I made changes to a particular file and made a commit, multiple commits to be precise, but none got pushed.
  I need to find the commit ID which was the last commit for this file in the remote branch.</p>
  
  <p>So I tried to find the last commit of the repo in the remote branch, but this commit of the particular file which is expected was way before the last commit shown in the git log. </p>
  
  <pre><code>git log
  
  git rev-parse --short &lt;branch&gt;
  </code></pre>
  
  <p>So consider there are two files,
  named A.txt, B.txt</p>
  
  <p>A.txt was modified on Jan 1,2019 and got committed, ID: abc123 (say)</p>
  
  <p>B.txt was modified on Jan 12,2019 and got committed, ID: abd456 (say)</p>
  
  <p>Both got pushed,
  So the last commit ID of the repo in the branch is abc456</p>
  
  <p>Consider, Today I made changes to A.txt and made multiple commits, ID: def123, def456, def789
  But I didn't push it to the remote branches.</p>
  
  <p>I am trying to filter out the lines modified in A.txt after the commit ID, abc123, So how to achieve this,</p>
  
  <p>I can get the expected log lines modified using </p>
  
  <pre><code>git blame "$filename" | sort -b -k 3 | grep -i "$lastcommit" -B 100 | grep -v "$lastcommmit"
  </code></pre>
  
  <p>But how to get the lastcommit (in the remote branch) of the particular file.
  Using the last commit of the repo on the remote branch, I couldn't get the expected results(Obviously as there is no matching commit Id in this)</p>