Question

I've made a commit to GitHub but the synchronization was not successful and it abort half way. When I try to get back the files I realized the files in local has been rebased to the previous version that I submitted during the last synchronization.

The new files and editions were lost. May I know whether there's any way to get back the lost data?(now it says "Rebase origin/master **" on my project)

Thank you!

Was it helpful?

Solution

Use the following:

  1. git log
  2. copy any previous commit id.
  3. git reset "commitid".

Now you will have your changes.

Then commit and rebase.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top