Yikes….dangling commit!
Posted on June 10th, 2008 by somanyfish
I discovered today what happens when you add and commit with git while you are not on any branch. You get a dangling commit and it looks for all the world like there is no way to get that work back. But all is not lost! Between this great post in Mathieu Martin’s blog and Eric available just when I needed him even though he’s over in France, I figured out that you can use “git fsck –lost-found” to get the sha code and then “git rebase sha” to merge that commit into your working branch. Phew. I had a ton of tiny, picky changes and was really not looking forward to redoing them all!
Discussion Area - Leave a Comment
You must be logged in to post a comment.