Today, I made git commits on no branch. I didn’t know it was possible, but apparently so! It happened when I opened a second shell of the directory I was working in, and I assumed that it would maintain the branch information. It didn’t.
I managed to make a merge back in, but I had to use GitX (a GUI for git) to do it. I have no idea what the syntax is for telling git to merge from
(no branch). I tried it just like that, but got an error for having parentheses unexpectedly. I opened GitX to take a look around, and the first thing I selected in the tree history (sorry, can’t recall what it was) threw an error and took me to the commit window to resolve my conflicts for the merge. Of course, I had to do the actual edits for the conflicts in my usual editor (MacVim), and then GitX forced me to run the commit from the command line, but at least it got me started and off of my no-branch purgatory!