Can you explain to me git reset in plain english?

Posted by e-satis on Stack Overflow See other posts from Stack Overflow or by e-satis
Published on 2010-03-27T16:44:39Z Indexed on 2010/03/27 16:53 UTC
Read the original article Hit count: 402

Filed under:
|

I have seen interesting posts explaining subtleties about git reset.

Unfortunately, the more I read about it, the more it appear that I don't understand it fully. I come from a SVN background and git is a whole new paradigm. I got mercurial easily, but git is much more technical.

I think git reset is close to hg revert, but it seems there are differences.

So what exactly does git reset do? Please include detailed explanations about:

  • the options --hard, --soft and --merge;
  • the strange notation you use with HEAD such as HEAD^ and HEAD~1;
  • concrete use cases and workflows;
  • consequences on the working copy, the HEAD and your global stress level.

I will put a bounty on this ASAP cause it's really important and I find the git doc cryptic.

Holly blessing and tons of chocolate/beer/name_your_stuff to the guy who makes a no-brainer answer :-)

© Stack Overflow or respective owner

Related posts about git

Related posts about reset