简体   繁体   中英

How to git merge squash in Eclipse

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM