# gitsplitter

> A nodejs cli tool to split monolithic GIT repository

Latest version **1.0.1** (published 2017-04-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install gitsplitter
pnpm add gitsplitter
yarn add gitsplitter
bun add gitsplitter
```

Provides the command `gitsplitter`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-04-13 |
| First published | 2017-01-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jduvignau |
| Maintainers | pushreset |
| Keywords | git, monolithic, split |

## Links

- npm: https://www.npmjs.com/package/gitsplitter
- Repository: https://github.com/pushreset/gitsplitter
- Homepage: https://github.com/pushreset/gitsplitter#readme
- Issues: https://github.com/pushreset/gitsplitter/issues
- npm.io page: https://npm.io/package/gitsplitter

## Dependencies (8)

- [async](https://npm.io/package/async.md) ^2.1.4
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.2
- [moment](https://npm.io/package/moment.md) ^2.17.0
- [jsonfile](https://npm.io/package/jsonfile.md) ^2.4.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [multispinner](https://npm.io/package/multispinner.md) ^0.2.1
- [randomstring](https://npm.io/package/randomstring.md) ^1.1.5

## Recent versions

- 1.0.1 (latest) — 2017-04-13
- 1.0.0 — 2017-01-18

## README

# GITSPLITTER

A nodejs cli tool to split monolithic GIT repository


For more information on monolithic repositories :

* https://gist.github.com/arschles/5d7ba90495eb50fa04fc
* http://gregoryszorc.com/blog/2014/09/09/on-monolithic-repositories/
* https://danluu.com/monorepo/
* http://www.thedotpost.com/2016/05/fabien-potencier-monolithic-repositories-vs-many-repositories

See https://www.npmjs.com/package/gitsplitter

# Requirements

* Git ~1.8
* NodeJS ~6.0.0

## Installation

```
npm install -g gitsplitter
```

On unix system you have to re-define file type with dos2unix tool (will be fixed soon :innocent:):

```
wich gitsplitter
dos2unix /path/to/gitsplitter/exec
```

Create a **gitsplit.json** configuration file in root of you monolithic repository :

```
{
	"temp_path": "/tmp/gitsplitter/",
	"clean_temp_folder": true,
	"source_repository": "git@github.com:pushreset/my_monolithic_repo.git",
	"master_branch": "master",
	"default_branch": "master",
	"allow_push_force": true,
	"push_force_on_master": false,
	"folders" : {
		"folder_a": {
			"name": "folder_a",
			"target_repository": "git@github.com:pushreset/my_splitted_repo_folder_a.git"
		},
		"folder_b": {
			"name": "folder_b",
			"target_repository": "git@github.com:pushreset/my_splitted_repo_folder_b.git"
		}
	}
}
```

## Usage

:exclamation: **BE CAREFUL THIS TOOL IS MAKING GIT PUSH FORCE ON DESTINATION REPOSITORIES** :exclamation:

On root of you monolithic repository :

```
gitsplitter
```

or

```
gitsplitter --branch=feat/awesome --folders=folder_a,folder_b --verbose
```

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D


## Credits
Julien Duvignau


## License
[ISC](https://spdx.org/licenses/ISC)

---
_Source: https://npm.io/package/gitsplitter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
