gitui-org / gitui-org/gitui

Restore File When Viewing History

Open
#2,729 2 comments 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
Rust
Stars
22.5k
Forks
773
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
I had a need to restore a file to it's previous version.

**Describe the solution you'd like**
In gitui, I went to the Files tab, found the file I wanted to restore, and viewed the history. From here I can view the the previous versions of the file. It would be useful if I could restore to whatever version I have highlighted.

**Describe alternatives you've considered**
What I did was use my mouse to copy the commit-id from the history view in gitui. Then run the following command `git restore -s ~`. Of note is the tilde at the end, this restored to one commit before the given commit-id. That fit my use case best.

**Additional context**
Thanks for your consideration!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.