On Jul 3, 2018, at 3:09 PM, Dewey Hylton <dewey.hyl...@gmail.com> wrote: > > Essentially what I did was to commit a change to a new branch, forget I was > in that branch and committed another unrelated change which should have gone > back to trunk but went into the branch.
That’s no big problem so far. I’ve done it myself, probably more than once. The right way to fix it at this point would be to cherrypick the changes that should have been on trunk from the branch onto trunk: $ fossil up trunk $ fossil merge --cherrypick abcd1234 …etc $ [test] $ fossil ci $ fossil up my-new-branch At that point, what you have is effectively as if you’d done this instead: $ fossil up trunk $ [hack, hack] $ fossil ci $ fossil up my-new-branch $ fossil merge trunk So, it’s an easy cleanup. > I then attempted to change that latest commit by adding a 'trunk' tag and > cancelling the new branch tag. Ow! > I'm pretty sure that was wrong, but I'm unsure now where to go with this. Cleanup is similar to the above, it just creates an uglier timeline: $ fossil up trunk $ fossil merge --integrate my-new-branch $ [test] $ fossil ci $ fossil merge --backout abcd1234 # ID of first checkin on my-new-branch $ [test] $ fossil ci $ fossil merge --cherrypick abcd1234 $ fossil ci my-new-branch You might have to give a checkin ID in the first command instead of a branch name if it isn’t putting you in the timeline where you think you ought to be. Fossil might even complain about having two “trunk” branch tips with this command; if so, the solution is the same. It’s okay to give the same branch name in the last command as you used originally because Fossil just uses branch names as auto-propagating labels. Checkin IDs and their relationships are what matters to Fossil, not branch names. Still, you might prefer to give it a different name to avoid causing yourself confusion, even though Fossil isn’t confused at all. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users