简体   繁体   中英

Restore not committed files in GIT

I have pushed one of my branch before committing the changes and then checked out to another branch. then I have done git reset to make this branch similar to origin. Also the remote branch has been deleted. Now when I switch back to the first branch, I am not seeing the files which was there. These files has been added , but not committed. How can I restore the files ?

Run the following to show unreachable git objects:

git fsck --cache --no-reflogs --lost-found --unreachable HEAD

To place them in .git/lost-found, skip the --unreachable flag.

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