how to remote add a single branch from a repository
<p>Lets say we have an Assets project with <em>master</em> and <em>dev</em> branches
and another project named TheProject.   </p>

<p>I want to remote add <strong>only</strong> the <em>dev</em> branch of Assets project.  </p>

<p>If I wanted to add the whole Assets project I would do:   </p>

<pre><code>#Add a new remote URL pointing to the separate project that we're interested in
git remote add -f ASSETS git@example/assets.git

#Merge the Assets project into the local Git project
git merge -s ours --no-commit ASSETS/master

#Create a new directory called ASSETS, and copy the Git history of the Assets project into it
git read-tree --prefix=ASSETS/ -u ASSETS/master

#commit the changes to your master branch
git commit -m "Subtree merged in spoon-knife"

git push
</code></pre>

<p>But anyway thats not what I need. I thought something like: </p>

<pre><code>git remote add -f ASSETS --single-branch dev git@example/assets.git
</code></pre>

<p>But if it worked I wouldnt be asking now! Any ideas?</p>