6

Sometimes I need to merge squash from Eclipse. I know I can do it in command line, but it will be really useful to have graphic option integrated in Eclipse. Do you know how to do it?

dimzak
  • 2,511
  • 8
  • 38
  • 51
Kritana
  • 2,236
  • 1
  • 14
  • 7

2 Answers2

4

You can start an interactive rebase in EGit, and select squash for the commits you want squashed.

http://wiki.eclipse.org/images/0/0b/Egit-3.2-InteractiveRebaseView.png


Note: for squashing the last few commits, historically the other way was a soft reset (see this thread)

  • select in history the first commit which I don't want to squash
  • right-click and say "Team->Reset->Soft"
  • right-click and say "Commit". This commit will contain all the changes of the last m commits together
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
2

Just open the context menu on your project and choose Team > Merge.... In the resulting dialog select the option "Squash" and the branch to merge.

Also see VonC's answer for other options.

robinst
  • 30,027
  • 10
  • 102
  • 108
  • Thank you! I will check it on Windows platform, it seems my plugin version does not have this option because I'm using a version for Solaris. – Kritana Jun 09 '14 at 10:46
  • I think this has been in EGit since 2.1, which is very old. So upgrading will get you lots of new features and bugfixes besides this :). – robinst Jun 10 '14 at 06:10