https://github.com/cebe/git-simple-subsplit
A git subtree/subsplit script for quickly creating one-way subsplit of repositories. (use for composer packages)
https://github.com/cebe/git-simple-subsplit
Last synced: about 1 year ago
JSON representation
A git subtree/subsplit script for quickly creating one-way subsplit of repositories. (use for composer packages)
- Host: GitHub
- URL: https://github.com/cebe/git-simple-subsplit
- Owner: cebe
- License: mit
- Created: 2013-09-27T10:29:36.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-05T17:28:27.000Z (over 12 years ago)
- Last Synced: 2024-10-11T21:55:50.972Z (over 1 year ago)
- Language: Shell
- Size: 128 KB
- Stars: 19
- Watchers: 6
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
git-simple-subsplit
===================
A git subtree/subsplit script for quickly creating one-way subsplit of repositories. (use for composer packages)
Can sync branches and tags.
##Usage
General usage:
```
git-simple-subsplit.sh subpath git@remotehost:repo.git [--tags "tag1 tag2 ..."] [--branches "branch1 branch2 ..."]
```
sync all tags and branches (always uses `origin` remote for checking branches and tags):
```
cd repo
git fetch origin
git-simple-subsplit.sh subpath git@github.com:user/subrepo.git
```
sync only `master` and `other` branch and all tags:
```
cd repo
git fetch origin
git-simple-subsplit.sh subpath git@github.com:user/subrepo.git --branches "master other"
```
##Workflow for creating and syncing sub-repos
### Create
```sh
git clone https://github.com/user/masterrepo masterrepo
cd masterrepo
git-simple-subsplit.sh path1 git@github.com:user/subrepo1.git
git-simple-subsplit.sh path2 git@github.com:user/subrepo2.git
...
```
### Update
Same as "Create" but it will use existing repo and cached data so only add new commits which is much faster.
```sh
cd masterrepo
git fetch origin
git-simple-subsplit.sh path1 git@github.com:user/subrepo1.git
git-simple-subsplit.sh path2 git@github.com:user/subrepo2.git
...
```