Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to recover reset files

Hardik Vaghasia April 26, 2015

Hi,

I have reset few staged/unstaged files by mistake and that file changes was very crucial. Is there any way to get those changes back?

Please advice.

Thanks

Hardik

2 answers

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2015

You may be able to recover some of the changes in your staged files:

http://stackoverflow.com/questions/11094968/in-git-how-can-i-recover-a-staged-file-that-was-reverted-prior-to-committing

According to everything I've seen, there's nothing to do that's native to Git or SourceTree for files that were never staged to begin with. Maybe you have other software that created a backup (OS, IDE, etc).

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 26, 2015

If the changes were edits to existing files, they are removed from the files and you cannot retrieve them from there. Your IDE or merge program might have backup files of an earlier state of the files.

If the files were now, untracked files, you might be able to undelete them.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events