git-annex initremote d type=directory directory=../d exporttree=yes importtree=yes encryption=none
git config remote.d.annex-tracking-branch master
date > ../d/foo
git checkout -b bar
git-annex sync --content d

This will import foo from d, but then it unexports foo from d.

Not quite data loss, because it does honor numcopies and the local copy remains. But bad.

The problem seems to be that it assumes it's merged d/master into master, but that does not happen since master is not the current branch. And so it then updates d to look like master. --Joey

fixed by avoiding updating export remotes when the current branch tree is not the same as the tracking branch tree. --Joey