#!/bin/sh -e mkdir -p joetemp/1 cd joetemp/1 git init -q echo butts1 > butts1 git add . git commit -m butts1 . -q cd .. git clone 1 2 -q #mkdir 3 #cd 3 #GIT_DIR=../2/.git git checkout -f -q sh /usr/share/doc/git-core/contrib/workdir/git-new-workdir 2/.git 3 cd 1 echo butts2 > butts2 git add . git commit -m butts2 -q cd ../2 git fetch origin -q git merge origin -q cd ../3 #GIT_DIR=../2/.git git merge origin git merge origin # "Already up-to-date." when obviously it is not.