Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TortoiseGit equivalence for 'TortoiseSVN --> Show log --> Revert to this revision'

Tags:

I am looking for a TortoiseGit operation which is equivalent to:

TortoiseSVN --> Show log --> Revert to this revision

In TortoiseSVN, this operation reverts the local repository to the revision selected, while keeping all changed files checked out.

In other words, the changed files show up when I do TortoiseSVN --> Check for modifications, and I can easily discard those changes when I finish testing the revision that I have reverted to.

For some reason, I am finding it very difficult to perform this useful operation on TortoiseGit.

The workaround that I am currently using is:

  1. Perform TortoiseGit --> Show log --> Export this revision...
  2. Copy the output files onto my local repository

Is there a more straightforward manner for this?

I've tried the following TortoiseGit operations, but they just "cause havoc" on my local repository, and I am unable to proceed with the "standard" Commit & Push procedure afterwards:

  • Reset "master" to this...
  • Switch/Checkout to this...
  • Rebase "master" onto this...
  • Revert change by this commit

I found a similar question here, but the answers suggest options that are not even viable in my TortoiseGit popup menu.

like image 845
goodvibration Avatar asked Aug 17 '17 16:08

goodvibration


1 Answers

I found another batter way than I answered before, and you don't care about Renamed and added itme(s) in this way:

  1. Select all commits you want to revert, and right click on them, and click Revert changes by these commits

    enter image description here

  2. Will be a progress dialog

    enter image description here

  3. Then, ask you if perform the Commit. Click Commit

    enter image description here

  4. The commit dialog:

    enter image description here
    But, as you can see, TortoiseGit gives out one sha1 value, instead of all commit sha1 values you want to revert. So you may be want to add/modify more information there. Like this:
    enter image description here

  5. The log of that revert commit

    enter image description here

like image 107
Yue Lin Ho Avatar answered Oct 11 '22 14:10

Yue Lin Ho