简体   繁体   中英

Browse old revisions of a git Repository

In SVN/TortoiseSVN, there was the GUI 'Repository Browser', which allowed to browse a previous 'state' of a repository. For example, I could go to log, pick an old revision, right-click on it, choose 'Browse repository', and then I had an Explorer-like GUI showing me the state of the repository at this time. This was particularly useful when I just wanted to see the state of the repository on a certain date , even if some of the files have not been changed then.

I have not found a similar feature in git. Both TortoiseGit and gitk allow me to view the log, but when I pick a revision, I cannot browse the whole repository state.

I certainly could check-out the old revision and browse it on the local drive, or revert my working copy to the old revision, but I found the TortoiseSVN feature much more user-friendly, since it allowed to quickly look up the state of file X or folder Y on day Z, without having to change local files and remembering to change them back later.

Can you do something similar in any Windows git GUI?

Thank you!

I believe you can do this with gitk by using:

gitk --all

This will show all branches in your gitk interface. Then select the Tree radio button. Instead of showing you the diff in each commit, it will show you the repository tree now. You should be able to browse the contents of the repository for each commit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM