I “reverted a commit” and lost days of progress. How do I get my progress back?

两盒软妹~` 提交于 2019-12-08 11:35:22

问题


In Github Desktop I tried to commit and sync progress (like the fool I am, the last time I sent a commit was 4 days ago). I got an error message saying something like the push didn't succeed because one of the files exceeded 100MB (I am looking into adding this file to .gitignore). I checked my github account online to see if any of the files got pushed and none did. I checked on Github Desktop and couldn't see any of the files. I thought to myself this isn't good because if it's not detecting these changes anymore how am I supposed to attempt to commit them again? In a panic, I seen the following "Revert this commit" button thinking my changes would show up in Github Desktop again:

I pressed Revert this Commit and nothing noticeable happened. I think I then pressed Revert this Commit again on something (bad habit..). After more panic, I thought I would just make a small change to one of my files to see if the change shows up in Github Desktop. It did. So I committed and synced this change. I checked my github account online and I could see it was pushed successfully. This is where I realize I really messed up. I go back to Android Studio and I now realize that days of progress (a bunch of missing files) are gone (because being the idiot I am I waited days to back up). At this point I think I just lost the progress I made. I am wondering if there is anyway I can get it back? Upon doing a bit of research I attempted the git reflog command and I notice some words like revert and reset. I am wondering if this is enough to work with to get my progress back?

I am scared to attempt anything else without advice because as proven I like to wreck things =(

来源:https://stackoverflow.com/questions/49850630/i-reverted-a-commit-and-lost-days-of-progress-how-do-i-get-my-progress-back

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!