Open xiaoyao9184 opened 1 year ago
I have the same issue using git subrepo pull
. When I execute the git branch command directly - it works just fine
it looks like it should be resolved by PR https://github.com/ingydotnet/git-subrepo/pull/498
After re-init and clone, I found that it was actually because the rebase changed the commit id and the .gitrepo file not same.
Work around? I rebased the master branch and I can push one subrepo, but 3 other nested subrepo's under that one all fail with this error. All subrepos are in rebase mode.
related: https://github.com/ingydotnet/git-subrepo/issues/503#issuecomment-1595365110
git checkout -b subrepo-fix
rm -rf subrepo/
git subrepo clone git@gitlab.com:org/subrepo.git subrepo/
git diff main
(optimally, only subrepo/.gitrepo
is different)Reset the files to the state on the main branch: git checkout main -- subrepo/file.txt
(be sure not to reset .gitrepo
)
Example: my MR
I found a potential fix for this issue here: https://github.com/ingydotnet/git-subrepo/issues/617
I used a directory name with a dot '.', which usually can't be used in a branch name, I tried using
git subrepo init
and it worked, but when I did agit subrepo push
it failed, guessing because of the dot name , the samegit repo branch
also fails.