title: git: how to "consolidate" the local commits
body: <p>I like to commit quite frequently (and even randomly) when I am working on some code, because if I screw up somewhere I can always roll back my changes. </p>
  
  <p>However, when I decide to push all the changes to the master repository, I don't like people to see all the random commits, because some of them are really meaningless to them, and it makes the change tree unnecessarily long. </p>
  
  <p>How do I "consolidate" all my local commits before I push? </p>