push - Pushing git subtree changes to upstream repository fails -
i'm trying ensure git's subtrees work me before incorporate project. encountered problem when pushing subtree changes upstream repository. the setup have 2 repos, sub , main , , main includes sub repo subtree . then following: initialize both repos initial commit. update sub repo directly (i.e. outside of main ). update sub repo within main repo. split changes sub (using git subtree split ) separate branch, checkout. attempt push upstream sub repo. naturally, push rejected because lose direct update sub . pull new change sub repo. attempt push upstream sub repo. time, should work, doesn't. i've written script encapsulates problem. i'm using git version 1.8.2.1 subtree module enabled. here's script: #!/bin/bash echo -n "wiping old repositories..." rm -rf main sub sub-home echo "done" echo -n "initializing main , sub repositories..." mkdir sub-home ( cd sub-home ; git init -q --bare ) git clone ...