Git - assertion failed on push to subtree repository

134 Views Asked by At

My situation is simple - I have a parent repository with a subtree nested in a subdirectory. Originally, these were two separate repos (i.e. I did not use the subtree split tool). I created the subtree on machine #1 like so:

git subtree add --prefix [my prefix] [repo url] trunk --squash

I then pushed to the parent repository remote with no issues. Then I checked out the parent repo on machine #2 (again no problems so far). Still within the parent repo, I made a change to a file inside of the subtree directory, committed from the root of the parent project, and pushed to the parent.

At this point I wanted to also push the change to the subtree's repository, so I tried running:

git subtree push --prefix [my prefix] [repo url] trunk

After a few minutes of it checking commits, it resulted in an error:

fatal: assertion failed: test blob = tree -o blob = commit

I can't find anything online explaining why this might be happening, anyone have any ideas?

1

There are 1 best solutions below

0
Alessandro Balbo On

You was probably having file for both repos in your commit, try again with a clean commit