The main problem is that the git subtree doesn't work without squash. Below I have added an example where I have 2 repositories (subtree and repo1).
- I have added subtree repo to repo1
git subtree add --prefix subtree subtree_repo main - Added new commit to subtree repo
- Merged new commit from subtree using command
git subtree merge --prefix=subtree subtree_repo/main - Now i can't push to subtree repo. Why? You can check branch temp_branch =
git subtree split --prefix=subtree HEAD -b temp_branchand in new commit git subtree trying to move files. Why?
Expecting push to subtree repo without new commits and changes