git subtree push changes back to subtree project git subtree push changes back to subtree project git git

git subtree push changes back to subtree project


For the behavior you want, I think you'll have to push from Master, I don't know of a way to pull subtree changes from Slave.

To push changes:

(in Master)$ git subtree split --prefix=lib/slave -b split-branch$ git push <bare Slave repo> split-branch:master$ git branch -d split-branch$ cd /path/to/Slave/working/copy$ git pull  # (now in Slave)

The first command creates a new subtree based on the directory, which is then pushed to the other project.

In theory, you should be able to push directly to a working copy, but in practice that didn't work for me.