Eclipse git checkout (aka, revert)

前端 未结 9 1253
感动是毒
感动是毒 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 18:35

    For reverting, you can right click on the file/directory that you want, then select Replace With -> HEAD version

    0 讨论(0)
  • 2020-11-29 18:36

    To revert your entire file to repository's data:

    Click on the folder you wish to do the revision and then go to the GitStaging

    0 讨论(0)
  • 2020-11-29 18:38

    Open Team Synchronizing. Find the file and right click --> Overwrite.

    UPDATE

    In Eclipse Luna (4.4.2) Open Team Synchronizing. Find the file and right click --> "Revert..."

    0 讨论(0)
  • 2020-11-29 18:40

    This can be done via the context menu "Replace with/File in Git index" on the file in package view.

    0 讨论(0)
  • 2020-11-29 18:46

    Revert a single file by going to Window > Show View > Other > Git Staging > Unstaged Changes

    Select the file(s) you wish to revert. Right click and choose Replace with HEAD revision

    Note that this step can't be undone.

    (I am using Eclipse Version: 3.7.2 Egit version 2.3.1.201302201838-r)

    0 讨论(0)
  • 2020-11-29 18:49

    in Eclipse Version: 3.7.0

    in "Team Synchronizing perspective" --> right click on file/folder in synchronize view --> overwrite

    0 讨论(0)
提交回复
热议问题