I had some local modification into multiple files which i do not want to submit So i have done following setps but my committed changes has gone can anyone plz
commit file which need to retain code changes
during push code got error you are behind the origin
I have overwrite local changes with following link Force overwrite of local file with what's in origin repo?
right now my commited changes has gone any help.
CodePudding user response:
If did not GC run, you can try with this:
# Inspect ref log to find lost commit
git reflog
# Retrieve the lost commit
git cherry-pick <lost-commit-hash>
Let me know if it worked.