title: How to do a "local-only commit" in git?
body: <p>I'm using git, and I'd like to be able to create a commit which isn't synced with the remote repository. Such a commit would have to "float" atop all other commits in the local repository to avoid affecting the history. I could use such a commit to store local-specific changes (configuration changes, debugging flags, local workarounds, etc.). </p>
  
  <p>Currently, I manually rebase when I commit to reorder the commit back to the top, and I push using <code>HEAD^</code> to avoid pushing the local changes. I've also considered putting the changes in the stash, but that's less convenient because it precludes normal use of the stash. Another alternative is to simply leave all those local changes unstaged, and use <code>git add -p</code> every time I want to commit. However, with a large number of trivial local changes, that becomes a hassle.</p>
  
  <p>Here's an example of my current workflow:</p>
  
  <p>My repository initially looks like</p>
  
  <pre><code>A---B---C---F master
  </code></pre>
  
  <p>where "F" is my floating commit.</p>
  
  <p>I make a commit:</p>
  
  <pre><code>A---B---C---F---D master
  </code></pre>
  
  <p>then <code>git rebase -i HEAD~2</code> to reorder:</p>
  
  <pre><code>A---B---C---D---F master
  </code></pre>
  
  <p>then <code>git push remote HEAD~1...</code> to push everything but the local <code>F</code> commit.</p>
  
  <p>The change F contains changes to existing versioned files, and may contain an arbitrary amount of changes. (If I can make more than one commit "floating", that would be even better, since I could then separate my local changes).</p>