Home > Blockchain >  Commited file is overwriiten into git
Commited file is overwriiten into git

Time:09-24

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

  1. commit file which need to retain code changes

  2. during push code got error you are behind the origin

  3. I have overwrite local changes with following link Force overwrite of local file with what's in origin repo?

  4. 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.

  •  Tags:  
  • git
  • Related