Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I did not try it, but it seems like it would work just fine. I guess if you would run git gc between running those two commands you would lose those commits, but unless you're running git gc automatically this should be a fairly risk free approach. I would still go with babay's answer, but if you want to save yourself from writing two extra commands I guess this is the way to go.
    – Erik B
    Commented Jul 8, 2013 at 13:32
  • I had left the master branch at some point, that i'm not totally sure. I had commited my changes, there were no changes on the master. These instructions brought my changes to the master branch and everythings good. Commented Dec 2, 2013 at 14:49
  • +1 I was nervous about checking out another branch while leaving commits behind, seeing this message added confidence to go for it.
    – J-Dizzle
    Commented Jan 28, 2015 at 21:39