Question: I have successfully created a big repo made of a few subrepos with git-subtree, let's say Master contains Slave1 and Slave2.

Master/
 Slave1/
 Slave2/

Now I want to tag on Master and push each tag to the slave repos, how can I do it?

If I "git push Slave2 --tags" the entire tag is transferred, but I only want the files related to Slave2 to be transferred.

You can achieve it with git-subsplit, but it's honestly a bit unpractical and slow.

Any suggestion?

Answer: 
As mentioned in "[How to make “git push” include tags within a branch?](https://stackoverflow.com/a/17219399/6309)", git 1.8.3 (May 2013) now includes a [`git push --follow-tags`](http://git-scm.com/docs/git-push) option:

> 
> Push all the refs that would be pushed without this option, and also push annotated tags in `refs/tags` that are missing from the remote but are pointing at commit-ish that are reachable from the refs being pushed.
> 
> 
> 

Now, remember that a [tag applies to the full repository (not a subdirectory)](https://stackoverflow.com/q/12796735/6309), but one idea would be to:

* merge `master` into a '`slave1_br`' when you have a stable state of `Slave1`, and put a tag there.
* merge `master` into a '`slave2_br`' when you have a stable state of `Slave2`, and put a tag there.

And then:

```
git push --follow_tags slave1 slave1_br
git push --follow_tags slave2 slave2_br

```

That is the only way I know to *not* push *all* the tags, but only the one reachable from the branch you are pushing.  

I realize that involves more than one branch (`master`), but it could be an alternative to `git-subsplit`.
I found this in a hard way. 

**When using subtree, the commit in the subtree repo will have a different SHA.** 

So you only need to push the commits to subtree, then locate **the specific commit in subtree repo** that you want to tagged, tag it and push to the subtree repo.

My setup is using sourcetree and github.com, but I think it should be same with other cases.

1. I have a main repo that sync to bitbucket, and a subfolder setup as subtree, sync to github repo.
2. I use this custom action in sourcetree to push the subtree

script to run: `git`

Parameters: `shiny/app` is my subfolder, webapp is my github repo remote name

```
subtree push -P shiny/app webapp master --squash

```

3. Find the specific commit in the subtree branch, tag it and push the tag to the subtree repo.

This is much easier and cleaner than all the answers above. Of course the tag is limited to the subtree instead of full repo, but I think this is what I want.