Repository navigation
Description
Description
we enabled pull force rebase in our config files to avoid haveing auto- created merge commits.
git config --global pull.rebase true
- i commit some local changes (actually this is a merge from a remote branch, whit adding files) (in the logs, its "adding jsondotnet library")
- my colleague pushed some commits via github desktop (2.0.4)
- i commit some last changes (there is no trace of the commit description in the log :p)
then i want to push, so i need to pull first.
while pulling and rebasing, i got 2 popups telling me that there were some mergeswithout conflicts, all lights green, so i clicked on "continue rebase"
pull seems to finished without errors (at least on the front client)
... but my 2 local commits have just vanished !!
do i miunderstood the way pull rebase is supposed to work ? or is there some bug there ?
i lost a day of work, with absolutely no way to recover the files i added or changes :(
Version
- GitHub Desktop: 2.1.0-beta3
- Operating system: Windows 10
Steps to Reproduce
Expected Behavior
at least some warning that my commit is gonna disappear and a way to cancel
Actual Behavior
no warning that my commits gonna be skipped
Additional Information
i saw this after, but i had the pdf files open, so git or desktop was not able to delete it from disk, hte erros may came from this, but still a warning popup before skipping a local commit entirely should be mandatory.
Logs
2019-07-03T12:33:05.960Z - info: [ui] Executing pull: git -c credential.helper= pull --recurse-submodules --progress FramaTK_VPI (took 54.729s)
2019-07-03T12:33:05.960Z - error: [ui] `git -c credential.helper= pull --recurse-submodules --progress FramaTK_VPI` exited with an unexpected code: 1.
stdout:
First, rewinding head to replay your work on top of it...
Applying: adding jsondotnet library
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Patch failed at 0001 adding jsondotnet library
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
stderr:
Fetching submodule Subrepos/MixedRealityToolkit-Unity
warning: unable to unlink 'Unity/Assets/JsonDotNet/Documentation/Json Net for Unity 2.0.1.pdf': Invalid argument
Filtering content: 7% (2/27)
Filtering content: 7% (2/27), 9.45 MiB | 685.00 KiB/s
...
Filtering content: 100% (27/27), 26.70 MiB | 539.00 KiB/s, done.
.git/rebase-apply/patch:12: trailing whitespace.
userData:
.git/rebase-apply/patch:13: trailing whitespace.
assetBundleName:
.git/rebase-apply/patch:14: trailing whitespace.
assetBundleVariant:
.git/rebase-apply/patch:27: trailing whitespace.
userData:
.git/rebase-apply/patch:28: trailing whitespace.
assetBundleName:
warning: squelched 24082 whitespace errors
warning: 24087 lines add whitespace errors.
error: The following untracked working tree files would be overwritten by merge:
Unity/Assets/JsonDotNet/Documentation/Json Net for Unity 2.0.1.pdf
Please move or remove them before you merge.
Aborting
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
(The error was parsed as 6: We found some conflicts while trying to rebase. Please resolve the conflicts before continuing.)
2019-07-03T12:33:07.724Z - info: [ui] Executing getBinaryPaths: git diff --numstat -z REBASE_HEAD (took 1.573s)
2019-07-03T12:33:07.727Z - info: [ui] Executing getBinaryPaths: git diff --numstat -z REBASE_HEAD (took 1.578s)
2019-07-03T12:39:09.968Z - info: [ui] [continueRebase] continuing rebase for 97bf7df8ec1f2bed31f827f800fefc3f24be3af1
2019-07-03T12:39:10.477Z - warn: [ui] [rebase] no tracked changes to commit for 0f926850da0b5970f9968ec04fde73a195f36f9f, continuing rebase but skipping this commit
2019-07-03T12:39:11.956Z - info: [ui] Executing continueRebaseSkipCurrentCommit: git rebase --skip (took 1.479s)
2019-07-03T12:39:12.272Z - info: [ui] [continueRebase] completed rebase - got ConflictsEncountered and on tip 97bf7df8ec1f2bed31f827f800fefc3f24be3af1 - kind Detached
2019-07-03T12:39:16.276Z - info: [ui] [continueRebase] continuing rebase for 97bf7df8ec1f2bed31f827f800fefc3f24be3af1
2019-07-03T12:39:16.624Z - warn: [ui] [rebase] no tracked changes to commit for e59604841615b222662e7d30def3fc490215b7da, continuing rebase but skipping this commit
2019-07-03T12:39:16.976Z - info: [ui] [continueRebase] completed rebase - got CompletedWithoutError and on tip 97bf7df8ec1f2bed31f827f800fefc3f24be3af1 - kind Valid
EDIT
i was able to recover my work with
git checkout -b recovery e59604841615...
Activity
Dimonasdf commentedon Jul 3, 2019
Deleted 300 changes for me too. Fix this, ffs.
Dimonasdf commentedon Jul 3, 2019
Well played there, Github.
You saved my day, thank you!
outofambit commentedon Jul 3, 2019
Hi @gilbdev thanks for filing this. I'm so sorry you and @Dimonasdf are having this problem.
I'm still investigating what happened in this case as it definitely looks like a bug. My current theory is that our conflict resolution didn't handle submodules or some file permission errors properly.
I see some submodule logs (
Subrepos/MixedRealityToolkit-Unity), was a submodule added or or updated in one of these branches or commits? This may be related to this error.outofambit commentedon Jul 3, 2019
@Dimonasdf could you share your OS and desktop versions? I'm also wondering if this is windows-specific.
gilbdev commentedon Jul 3, 2019
no, nothing in the commits or merge were linked to the submodules.
in the first commit, i had a pdf file that was added. (the one that generates a warning in the log)
during the pull rebase, i had this file opened (default pdf reader is currently ..microsoft edge :/)
so if the rebase does try to stash or remove the file from disk, it may have failed, and snow ball the error.
so you may try something like that ( i got git lfs enabled in the repo, but sadly pdf are not listed in git attributes):
-user A commit a pdf file
-user B commit anything and push
tidy-dev commentedon Sep 16, 2024
Unable to reproduce:
(With git config --global pull.rebase true)
Closing in case this was resolved with a git upgrade. I remember a while back there was one involving that config.
However, if someone can runs into this and can reproduce, feel free to comment back with reproduction steps.