Eclipse git checkout (aka, revert)

前端 未结 9 1258
感动是毒
感动是毒 2020-11-29 18:02

Is it possible to do the equivalent of git checkout from within Eclipse using the EGit plugin?

I have a file that\'s been modified. I want to discards t

9条回答
  •  一生所求
    2020-11-29 19:00

    The functionality is actually in there, but it may be non-obvious:

    • Make sure quickdiff is enabled with a git revision and the quickdiff baseline is HEAD (this is the default).
    • Open the file you want to revert.
    • Select everything (Ctrl-A)
    • Right-Click in the quickdiff bar
    • Select "Revert selection"
    • Save

    btw, revert in git lingo means create a new commit to revert an earlier commit.

提交回复
热议问题