title: pull latest commit from a branch in git
body: <p>my friend and I are working on a particular branch of a repository in Github at the same time, however, when I try to push my changes, if he updated the files before I pull and I try to push mines I get an error from github, and I was wondering if is there any correct to pull the changes before I have changed some files?</p>
  
  <p>so far, I have tried to use <code>fetch origin branch-name</code> but this adds some HEAD content in my files, is there a missing step or a better way to do it?</p>
  
  <p>all I basically need is be able to pull the latest changes on github repository and then push my changes.</p>
  
  <p>thanks, any advice would be very much helpfull</p>