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.
Thanks in advance!
Den
For both Mercurial and Git, the first question to answer when deciding how to fix a mistake is: "Have you pushed the mistake?"
This blog post covers how to proceed in both scenarios: http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html
To summarize, if you HAVE NOT pushed, you should "rollback".
If you HAVE pushed, you should "backout", creates a new commit that "undoes" the changes.
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!
2017-01-20 12_52_01-SourceTree.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.