I was committing a big update (15 hours of work) and when i went to push (after i had committed and staged my files)
It told me one of my files was 1gb and cant be pushed (due to the 100mb maximum)
So i used a reset to commit, on soft, so that i could re-commit and push my changes without, that massive files.
After the reset said it was complete, My working copy (that i was about to commit) has disappeared and I am left with the version of it that is the old version and cannot find my files i was going to add.. How can I get them back?
I need them.
The log says this :
commit: # Major Update
1b8d17b92ccadc41aaa3995447ae550e8e52b947 4cada132357fd6af4bdf6d817cd5ae439dbc042e DevelopdProgramming <DevelopdProgrammingOfficial@gmail.com> 1581838868 +1000 pull origin master: Merge made by the 'recursive' strategy.
4cada132357fd6af4bdf6d817cd5ae439dbc042e 1f8133c1b507a720f043c377d1987a4448ea80a2 DevelopdProgramming <DevelopdProgrammingOfficial@gmail.com> 1581839264 +1000 revert: Revert "# Major Update"
1f8133c1b507a720f043c377d1987a4448ea80a2 fefddde1f72fd2d894e0da06f7c0f00715d02dda DevelopdProgramming <DevelopdProgrammingOfficial@gmail.com> 1581839331 +1000 reset: moving to fefddde1f72fd2d894e0da06f7c0f00715d02dda
If you know anything that may help please answer ASAP,
As an answer to this question - Open terminal
and use git reflog
Then find the HEAD{1,2,3,4 ect.} that is before your revert.
and do a git reset 'HEAD@{your number)
from there put in git status, and it should pop up with a bunch of files that were deleted/modified.. if it doesn't repeat the first steps above again till it does (with a different or the same number, just find the same text for the commit before the revert)
then once it does pop up with the list of deleted/modified files,
put in git stash
and you will have it all back!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.