From: Steffen Jaeckel Date: Tue, 30 Apr 2013 11:13:54 GMT Subject: Re: Unexpected behavior of git-subtree Message-ID: <10210336576.20130430131354@stzedn.de> In-Reply-To: <20130429182052.GN472@serenity.lan> On Monday, April 29, 2013, 20:20, John Keeping, wrote: > On Mon, Apr 29, 2013 at 07:34:27PM +0200, Steffen Jaeckel wrote: >> >> ---- snip ---- >> sjaeckel@T7400-003 /h/projects/my_project (develop) >> $ GIT_TRACE=2 git subtree push --prefix=lib/com_lib/ git@git.local:com_lib develop -b develop > Without knowing much about git-subtree, this looks like the culprit. A > quick look at cmd_push in git-subtree.sh indicates that it doesn't check > for an error return from 'git subtree split --prefix=$prefix', so if > that goes wrong you end up doing: > git push $repository :refs/heads/$refspec > which deletes the branch. > Can you try running this: > git subtree split --prefix=lib/com_lib/ > and see if that gives the same "fatal: bad object" message as above? John, thanks for testing! I just found out that it's all about the slashes.... The solution was: > git subtree push --prefix=lib/com_lib git@git.local:com_lib develop look at the missing '/' at the end of the prefix. Steffen -- Steffen Jaeckel