 <p>Before you do a <code>git push</code> you have to do a <code>git pull</code>. Other person's work has to be merged with your code first and then you can push your changes to the repository. git pull will keep your updated code as it is and only add/update code (meaning that git will merge code) from the last commit (other person's code).</p> <p>In case where both of the developers have worked on the same piece of code then git will show <em>conflicts</em> which have to be <em>resolved</em> first.</p>