Skip to content

Commit

Permalink
Added split subcommand info in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tdd committed Feb 23, 2015
1 parent beaa1df commit aba5fbf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,19 @@ $ git stree rm payment

If you wish to remove all subtree settings, use `git stree forget` instead.

### split

Perhaps you’d like to turn a part of your codebase, which up to now was always inside this repository, into a subtree. This way, you could share it across other codebases. We offer a `split` subcommand just for that. It takes exactly the same arguments as `add`, only instead of grabbing the subtree from its remote, it creates it there (the remote has to exist and be ready for a first push).

Say you have a `vendor/plugins/payment` subdirectory you want to turn into a subtree, to be pushed on a remote you’ve just created at `git@github.com:myorg/plugins-payment.git`. Just use the following command:

```
$ git stree split payment -P vendor/plugins/payment git@github.com:myorg/plugins-payment.git
✔︎ STree 'payment' configured, split and pushed.
```

You can now `add` that subtree in other repos, and maintain its subdirectory as if it had originally been imported with an `add`, too.

## Caveats

* Completion likely doesn't work on zsh just now, and perhaps not well on msysGit / Cygwin environments.
Expand Down

0 comments on commit aba5fbf

Please sign in to comment.