ChopperCharles
ChopperCharles

Reputation: 787

How do I check out an older version of a file with TortoiseGit?

I see threads on here about checking out older versions of a file with the command line git, but how do I do it with TortoiseGit?

Upvotes: 8

Views: 15754

Answers (6)

Radzor
Radzor

Reputation: 193

  • Show log option (right-click one the file), but remember to un-check Show Whole Project to only display commits relevant to the selected file. Show log dialog window

Then, for better display, click View and check Hide Unrelated Changed Paths

  • Next you can right-click on the file and use Revert to this revision enter image description here

Upvotes: 7

FrankGT
FrankGT

Reputation: 127

Most of the other answers will result in the changes to the local file being overwritten. It seems to me the the OP just wanted to see one of the older versions, as I occasionally do. To do this, follow the initial steps of the other answers: right-click the file, select TortoiseGit > Show Log, and select the version you are interested in seeing. In the bottom pane, right-click the file and select "Save revision to...".

Upvotes: 4

CodeWizard
CodeWizard

Reputation: 142174

As you can see here:

enter image description here

You have the show log option. Select it and then you can browse your file history.

Upvotes: 2

David Deutsch
David Deutsch

Reputation: 19035

Right click on the file you are interested and choose Tortoise Git --> Show Log. Select the commit in the log you are interested in, then right click on the file you are interested in the bottom pane, and select "Revert to this Revision"

Upvotes: 2

Nate M.
Nate M.

Reputation: 842

Right click the file, select TortoiseGit > Show Log. Find what revision of the file you want to check out, by clicking old revisions in the bottom pane of the log. Once you find which one you want to check out, select 'Revert to this revision'. Word of warning, I'm not sure if this reverts a single file, or rolls the entire repo back to that hash tag.

Upvotes: 3

obi1
obi1

Reputation: 314

Select Tortoise Git -> Show Log ->

In the dialog that opens, select the desired version at the top of the browser. Select specific file at the bottom of the browser Right click on the file & Select "Revert to this version".

Upvotes: 0

Related Questions