Occasionally I find my self in the following situation: I am working on branch (say master) and I am editing some files, but when it comes the time for a commit I realize that I would prefer to commit to a new branch (say experimental). In other words, the old branch (master) must remain intact and a new branch should be created that will look like:
.. -- master -- new commit
What is the easiest way to do that?
Currently, I commit to old branch, then create the new branch and finally reset the old branch. But that's really ugly.