Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
610 views
in Technique[技术] by (71.8m points)

mercurial - How to rebase in tortoisehg?

Often after committing changes, I do a pull, before pushing my changes, and someone has already committed changes. I could do another (merge) commit, but where possible I like to maintain linear history, as it makes things a bit easier to read.

So how does one rebase a changeset using tortoisehg, without resorting to using the command line?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

First enable rebase:

File -> Settings -> Extensions

enter image description here

Then (after restarting tortoisehg)

  1. Update to the changeset you want to rebase on to.

updating to base changeset

  1. Right click on change you want to rebase and select the Modify History -> Rebase menu.

clicking rebase

  1. Click Rebase.

And you should end up with something like this:

enter image description here

Warnings:

  1. It's not usually a good idea to rebase a changeset with a public Phase.
  2. Avoid rebasing changes that are likely to produce complicated merge conflicts.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...