-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git subrepo pull after squashing #578
Comments
Helo @ehrencrona .
If there is no new local commits after your last Now the last three commit histories of your branch will be:
I think this commit history is not clean enough, so I will fix it using: git rebase --soft commit3
git commit -m "new comment message".
git push -f
git subrepo push -r $your_remote -b $your_branch --force If after
If you want to keep the original commit messages after your last 'subrepo push' instead squashing them into one commit. This is a little more complicated. You need to modify the above code, start with git rebase -i temp_branch
# pick all normal commits
# drop all commits generated by subrepo
git branch -D temp
git push -f
git subrepo push -r $your_remote -b $your_branch --force |
I'm getting the error message
Local repository does not contain <A>
("A" being a specific commit ID) when runninggit subrepo pull
. This is because I had rebased the history of the subrepo to squash some commits and clean up the history.The equivalent, squashed commit (that is part of the history of
main
) has commit ID "B".I tried to go into the
.gitrepo
and replace thecommit=
line with "B", but when I do that and rerungit subrepo pull
I am still getting the same error message referring to commit "A". I have grep'ed through the entire repo and there is no reference to commit "A" anywhere.How can I recover from this situation?
The text was updated successfully, but these errors were encountered: