eclipse - How do I revert all files to a previous commit using EGit? -


i using egit 2.2.0.20-1212191850-r github. of local files committed , pushed. there master branch. permanently revert of files previous commit (not head~1). how do it?

here's have tried:

  1. i opened history pane, see past commits.
  2. i right-clicked on earlier commit , selected reset > hard.
  3. i see old version. try committing old version none of changed files show in commit changes window, if explicitly add them index.

i tried checkout in step 2, same result.

eclipse git checkout (aka, revert) not relevant, since reverting head, not earlier commit.

what i'd create new branch earlier commit, i'll settle reverting.

if pushed commits, recommended revert commits. reason revert add new commits history instead of replacing history, makes possible other people pull instead of having rebase on replaced history.

so in history view, select newest commit want undo, open context menu , select "revert". repeat parent commits. when you're done, push result.

also note "git checkout" , "git revert" different things, "git revert" creates new commit undos changes of previous commit. "git checkout" on other hand changes working directory or current branch commit. may confused because "svn revert" "git checkout" does, not "git revert".


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -