Discard in git or tortie

Is there an easy way to cancel the return of the turtle?

Here's more info: I just did a big check with several files, and immediately decided that instead I want to do a separate small check before the big one, in order to facilitate making changes to this big check tomorrow.

So, I picked up the log in the turtle, right-clicked on the last registration and selected "revert". This reduced the changes and deleted a bunch of files in my working directory. What I really wanted was to "reset" (rollback the scan and leave my working directory as it is), and not return (create a "excellent scan" in my working directory).

How can I cancel my refund?

+4
source share
3 answers

Just git reset to your desired goal. A revert nothing special: it's just a normal commit, which does the exact opposite of what the other commit does. Since this is just a regular commit, it will be garbage collection, like the other commit you originally wanted to get rid of.

+5
source

After Google Gogling found the answer in this blog post : just run the revert command again and it will cancel your refund without cluttering your story with any additional commits. It is as if I never ran away in the first place.

The blog post only mentions this trick for regular (command line) git, but the same thing works in the turtle. What is especially nice is that other changes in my working directory are not discarded - only the return is canceled.

I leave self-generated Q&A here because it was hard to find this answer - we hope someone else saves time.

+7
source

I tried to return the commit that I had previously returned and did nothing. The result was "nothing to fix (working directory" clean ")."

What did the cherry that took the previously canceled fixation. This led to changes that I previously returned and did not change the working directory in other cases.

0
source

All Articles