I accidentally abort my conflict changes, so all files disappeared. Can i undo that process? or recovery my file? I really need my file because all my works has gone. Hufft...
Asked
Active
Viewed 141 times
1
-
If I'm understanding you right, you had **local progress that had not yet been committed**. When attempting to pull or merge, a conflict arose. You aborted the conflict resolution, which clobbered your local **uncommitted** changes. If that understanding is correct, I'm not sure there's a `git` solution to undoing this mistake. You may want to check if your IDE has local history. The JetBrains IDEs (IntelliJ, WebStorm, PyCharm, etc) keep this by default. Some others might do this, or you may have some filesystem level backup. OTOH if you **did** commit your work, just do `git reset` Good luck. – sytech Feb 14 '22 at 13:10
1 Answers
0
It depends on how the abort was done:
- locally, in a local cloned repository of the GitLab remote repository (
git merge --abort
) - remotely, through the GitLab web GUI (see "GitLab Merge conflicts")
In both cases, what could be lost is the resolution work done so far.
But no new file should have been erased. Local modifications are, however, removed: see "Local changes lost after aborting merge in GIT".
Only git merge --quit
would remove everything.
Worst case, you redo the merge, and resolve the conflicts again.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
My case is, i abort the conflict changes and there is a lot of changes in that state. After i accidentally click abort, it erase everything. Can i get all changes files before abort? – acinom27 Feb 14 '22 at 09:11
-
@acinom27 Are those changes related to merge conflict resolution? Or to other unrelated work in progress? And are you talking about local changes on your computer? – VonC Feb 14 '22 at 09:23
-
Yes there is related to merge conflict. Yes its about my local changes on my comouter – acinom27 Feb 14 '22 at 09:37
-
@acinom27 local, meaning the modified files are probably lost, unless your IDE has some kind of history plugin activated. Worst case, can you retry the merge? – VonC Feb 14 '22 at 14:56