# @umm/git

> git command wrapper for Unity

Latest version **2.0.1** (published 2018-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @umm/git
pnpm add @umm/git
yarn add @umm/git
bun add @umm/git
```

## 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 | 2.0.1 |
| Published | 2018-03-05 |
| First published | 2017-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 22.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 1 |
| Author | Tetsuya Mori |
| Maintainers | fakestarbaby, hanage, kidsstar_system, mkaya, monry, risacankidsstar, takyama |

## Links

- npm: https://www.npmjs.com/package/@umm/git
- Repository: https://github.com/umm-projects/git
- Issues: https://github.com/umm-projects/git/issues
- npm.io page: https://npm.io/package/@umm/git

## Dependencies (7)

- [ncp](https://npm.io/package/ncp.md) ^2.0.0
- [glob](https://npm.io/package/glob.md) ^7.1.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.1
- [@umm/unirx](https://npm.io/package/@umm/unirx.md) ^1.0.3
- [@umm/command_runner](https://npm.io/package/@umm/command_runner.md) ^1.0.1
- [@umm/environment_setting](https://npm.io/package/@umm/environment_setting.md) ^1.1.4

## Recent versions

- 2.0.1 (latest) — 2018-03-05
- 2.0.0 — 2018-01-22
- 1.0.5 — 2018-01-19
- 1.0.4 — 2017-10-25
- 1.0.3 — 2017-10-25
- 1.0.2 — 2017-10-25
- 1.0.1 — 2017-10-10
- 1.0.0 — 2017-10-06

## README

# git

* git コマンドの Unity 実装

## Requirement

* Unity 2017.1
* git
* hub (Optional)

## Install

```shell
$ npm install github:umm-projects/git
```

## Usage

### 実装済のクラス

* [`Git`](Assets/Scripts/UnityModule/Command/VCS/Git.cs)
    * `git` コマンドを同期的に実行
* [`GitAsync`](Assets/Scripts/UnityModule/Command/VCS/Git.cs)
    * `git` コマンドを非同期的に実行
* [`Hub`](Assets/Scripts/UnityModule/Command/VCS/Hub.cs)
    * `hub` コマンドを同期的に実行
* [`HubAsync`](Assets/Scripts/UnityModule/Command/VCS/Hub.cs)
    * `hub` コマンドを非同期的に実行

### 実装済のサブコマンド

* `add`
* `branch`
* `checkout`
* `commit`
* `push`
* `rev-parse`
* `rm`
* `pull-request`
    * `hub` コマンドを利用

### 同期的にコマンドを実行する

```csharp
Git.Add(new [] { "hoge.txt", "fuga.cs", });
Git.Commit("message for commit");
Git.Push("any_branch_name");
```

### 非同期的にコマンドを実行する

```csharp
// 書き方を統一するために、空の Unit を吐き出すところから開始している
Observable.Return(Unit.Default)
    .SelectMany(_ => GitAsync.Add(new [] { "hoge.txt", "fuga.cs", }))
    .SelectMany(_ => GitAsync.Commit("message for commit"))
    .SelectMany(_ => GitAsync.Push("any_branch_name"))
    .Subscribe();
```

## License

Copyright (c) 2017-2018 Tetsuya Mori

Released under the MIT license, see [LICENSE.txt](LICENSE.txt)

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