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.

4
  • 1
    No, git reset --mixed resets the index. (--mixed is the default, by the way.) --soft is the option to leave the index as it is.
    – user743382
    Commented May 14, 2015 at 12:01
  • but iirc mixed also does the job innthis case, right?
    – MrTux
    Commented May 14, 2015 at 12:03
  • No, in general, it doesn't. After git reset --mixed, you'd have to worry about re-updating your index to the exact state it was in before you executed git reset, and that's not necessarily trivial.
    – user743382
    Commented May 14, 2015 at 12:04
  • This is brilliant. I guess this would preserve peoples branches too.
    – J0hnG4lt
    Commented May 14, 2015 at 12:14