0

git checkout has a mode that is very different from its normal operation. When called as git checkout <commit> <path>, for example

git checkout 1234abcd . 

it will not change HEAD at all but instead it will load the file set from <commit> and replace the working copy with it so that the files can be committed as new changes.

Is there a way I can trigger the same operation using the TortoiseGit dialogs?

1 Answer 1

1

If you exactly know the revision and need specific files, open the repository browser (it can also be opened from the log dialog), select the file(s) there and then either drag'n'drop it to where you need it or use the context menu to revert the files in place.

If I want to reset my working tree files to the state of a specific version, I usually use the Log Dialog and perform two resets: First a hard reset to the revision and then a mixed or soft reset back to the "old" revision I came from.

Sign up to request clarification or add additional context in comments.

1 Comment

Hm, I have to manually navigate to the correct destination, but otherwise dragging from the Repo Browser is a pretty good solution.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.