title: What happens when both developers work on same file and commit it, update and etc
body: <p>We want to start an open source project and use Git with my friend. We know about Git, but we only used it for forking things before/work alone.</p>
  
  <p>Let's say we've created a repository. </p>
  
  <p><strong>Situation 1:</strong></p>
  
  <pre><code>Both of us downloaded repository to our local computers to started working.
  I've created A.php, with a function named A() in it. Committed.
  My friend created B.php, with a function named B() in it. Committed.
  </code></pre>
  
  <p>Q1: Our local repositories aren't updated but github repository is updated. How can we sync it without downloading the entire repo again?</p>
  
  <p>Q2: How often do developers update their local repositories? I may update it at 20:00, but there may be a different commit at 20:05. Is there any realtime solutions for updating local repos? Like dropbox in this case, you make a change and it automatically sync it.</p>
  
  <p><strong>Situation 2</strong></p>
  
  <pre><code>Me and my friend both started working on A.php. The file currently has function A(). 
  I made a function called function B(), committed.
  My friend also created a function called B() too. Committed.
  </code></pre>
  
  <p>Q3: What is going to happen? Do the first committer commits normally, and the second committer gets an error like "File changed, please sync the file again and commit afterwards."?</p>