Trying to use git subtree to share common library files across multiple projects. Here's the problem I keep encountering.
1) Add subtree so "lib" subdirectory of my project is coming from lib-dk repository.
$ git subtree add --prefix=lib --squash git@bitbucket.org:dwknight/lib-dk.git master
2) Make changes to files in "lib"
3) commit changes to main project repo
$ git commit -am "update project"
4) push updates to main project repo
$ git push origin master
5) push changes in "lib" back to "lib-dk" repo
$ git subtree push --prefix=lib git@bitbucket.org:dwknight/lib-dk.git master
git push using: git@bitbucket.org:dwknight/lib-dk.git master
To git@bitbucket.org:dwknight/lib-dk.git
! [rejected] f455c24a79447c6e3fe1690f5709357b7f96828a -> master (non-fast-forward)
error: failed to push some refs to 'git@bitbucket.org:dwknight/lib-dk.git'
hint: Updates were rejected because the tip of your current branch is behind its remote counterpart. Merge the remote changes (e.g. 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
6) I get this rejection even if nothing has changed in the lib-dk repo. When I try a pull, it acts like something has but I'm able to update via the pull. Still the push continues to be rejected.