title: How do I get the Git log for a specific branch only?
body: <p>Assuming the following Git history:</p>
  
  <pre><code>Branch1     B---C-------F---G
             /     \           \
  Master    A-------D---E-------H
  </code></pre>
  
  <p>Doing a <em>git log master</em> gives the log entries in following order <strong>A-B-C-D-E-F-G-H.</strong> - but I'm interested in history of master-only (i.e <strong>A-D-E-H</strong>)</p>
  
  <p>How can I "get rid" of the unwanted log-entries from <em>Branch1</em>? I tried a lot of options for <em>git log</em>, but I cannot find anything appropriate...</p>
  
  <hr>
  
  <p>This leads to a further thing I don't understand in this context:</p>
  
  <p>Looking at the log-history given by <em>git log master</em> it shows how my branch master evolved (<strong>A-B-C-D-E-F-G-H</strong>).</p>
  
  <p>But doing a <em>git checkout HEAD~1</em> (assuming master=HEAD) gives me <strong>E</strong> (Evolution <em>HEAD~3</em>:<strong>A</strong> - <em>HEAD~2</em>:<strong>D</strong> - <em>HEAD~1</em>:<strong>E</strong> - <em>HEAD</em>:<strong>H</strong> -> <strong>A-D-E-H</strong>)</p>
  
  <p>This is what I don't understand: the ancestor of <strong>H</strong> looking at <em>git log</em> is <strong>G</strong>, while the ancestor of <strong>H</strong> looking at <em>git checkout</em> is <strong>E</strong>.</p>
  
  <p>I don't understand this - What's the ancestor of <strong>H</strong>: <strong>G</strong> or <strong>E</strong>?...</p>
  
  <hr>
  
  <p><strong>Conclusion</strong>: What I would like to have are <em>git log</em> entries from <em>HEAD</em> to <em>HEAD~n</em> only (for example above n = 1...3).
  How can this be achieved? Is it possible at all?</p>