title: What is the file format of a git commit object data structure?
body: <p>Context: I was hoping to be able to search through my git commit messages and commits without having to go through the puzzlingly complex git grep command, so I decided to see how git commit messages were stored. </p>
  
  <p>I took a look in a .git folder, and it looks to me like commits are stored in </p>
  
  <pre><code>.git/objects 
  </code></pre>
  
  <p>The .git objects folder contains a bunch of folders with names like a6 and 9b.  These folders each contain a file with a name that looks like a commit sha 2f29598814b07fea915514cfc4d05129967bf7.  When I open one of those files in a text editor, I get gibberish.  </p>
  
  <ol>
  <li>What file format is this gibberish / How is a git commit object stored?  </li>
  <li><p>In this git commit log, the folder 9b contains one commit sha </p>
  
  <pre><code>aed8a9f773efb2f498f19c31f8603b6cb2a4bc
  </code></pre>
  
  <p>Why, and is there a case where more than one commit sha would be stored in the file 9b?  </p></li>
  <li><p>is there a way to convert this gibberish into plain text so that I can mess with commits in a text editor?</p></li>
  </ol>