1

I am using Mercurial with Eclipse. I made a commit and I commited some files which shuld not been commited.

Do you know if there is a possiblity to delete those files from the commit.

Thank you.

tarsis
  • 174
  • 1
  • 9
Milos Cuculovic
  • 19,631
  • 51
  • 159
  • 265

1 Answers1

1

rollback (if it's the most recent commit) or strip (if it's older) would do it for you. This post has more details on these commands. To do it with MercurialEclipse, right click on your project in Eclipse and do Team-->Undo-->Rollback or Team-->Undo-->Strip.

If those aren't options, you could just remove the files in question and then commit that as a separate changeset. That would, of course, preserve the fact that those files were once under Mercurial control. If that is not desirable, this page lists some more options. If you go the MQ route, the workflow listed there can be done in MercurialEclipse via the "Mercurial Patch Queue" view.

Community
  • 1
  • 1
Evan Haas
  • 2,524
  • 2
  • 22
  • 34
  • Thank you Evan. I tryed with rollback but didn't wotk because i made a pull after the commit. With the strip, the problem is that it will delete all my work after the before last commit, and I have a lot. Is it possible to delete only some commit files from the commit? – Milos Cuculovic Aug 08 '12 at 13:12