Small utility for publishing a subtree of your repository as a new git repository.
- Clone the project
git-publish-subtree/binto your path.
git clone https://bitbucket.org/tpettersen/git-publish-subtree ~/git-publish-subtree export PATH=$PATH:~/git-publish-subtree/bin
Then you can use
publish-subtree just like any other git command.
git publish-subtree plugins/jira-integration email@example.com:atlassian/jira-integration.git
git publish-subtree [<subtree>] <remote>
<subtree> is omitted, the current directory will be used.
The new repository will be pushed to
<remote>repository must either:
- be empty; or
- have been the target of a previous
git publish-subtreeinvocation from the same
<subtree>from a commit somewhere in the history of your
otherwise the push will fail due to a non-fast-forward merge.
<remote>should be put into read-only mode between updates by
git publish-subtree. There is currently no way to integrate changes to the
<remote>back into your project.
Any tags not containing the
<subtree>will be ignored.
- There is currently no way to force an update of the
<remote>. If you have divergent history, you'll have to manually fix-up the remote before you running this command. (or hack the script and add a
-fto the push)
- Only the default branch (currently hard-coded to
master) and any tags
present in the local repository will be pushed to