1

This is really a best practices question. Using Bitbucket with Mercurial, SourceTree, and PyCharm. I am testing with a series of commits and merges, and I want to test "reverting". This means, to me, setting my default branch to an earlier commit somehow, either by backing out the merge or just updating the files from the earlier commit. How would you suggest I do that?

Edit: I'm really having trouble getting a handle on this. I've tried all the obvious things - there's no "rollback" or "revert" command, and the "reverse commit" only works on commits which haven't been merged. I tried just making the earlier merge point become the tip - thereby abandoning the original tip - and that sort-of worked but seems to have caused problems. I tried this by selecting the earlier merge point, but I couldn't push it (no changes). So I made a small change and couldn't push it (error message about creating a new remote head). So I used Force Push in PyCharm and was able to make it the tip. But now I have two "default" markers, and that seems to be an issue. When I made a new branch, it didn't show it as a new branch but in the main line with the new branch as a marker on the text descriptor, and when I made a change in that branch it wouldn't let me push the commit (something about heads). Then I tried clicking the point before the new branch would be and chose merge, and it let me merge the new branch back in and the tree goes in and out. Could really use help here!

enter image description here

dennitzio
  • 43
  • 3
  • Possible duplicate of [How do you revert with sourcetree?](http://stackoverflow.com/questions/36355304/how-do-you-revert-with-sourcetree) – Nanhydrin Jan 19 '17 at 10:22
  • Thank you for responding. I looked at that one earlier, but the solution there does not appear to apply to the Mercurial version of SourceTree for Windows. Reverse Commit works, but only for commits without merging. There is no "reset" or "checkout". When I double-click an earlier merge, it shows it as active, but I don't see a way of making it the latest. – dennitzio Jan 19 '17 at 16:37
  • if you're using Mercurial on Windows, and you like SourceTree, then I would recommend you to switch to TortoiseHg (IMO the best of the Tortoise* you'll ever try) unless the reason for SourceTree was having also Git support in it. – arhak Jan 25 '17 at 11:44

0 Answers0