Restore File When Viewing History
- Lingua principale
- Rust
- Stelle
- 22.5k
- Fork
- 773
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**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!
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia tracciando la vista della cronologia della scheda Files e il modo in cui identifica la versione evidenziata del file. Implementa il ripristino della versione selezionata, in linea con il caso d’uso git restore segnalato, e verifica che il ripristino della voce evidenziata produca il contenuto del file previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, rust
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100