Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

umm/git_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git

  • git コマンドの Unity 実装

Requirement

  • Unity 2017.1
  • git
  • hub (Optional)

Install

$ npm install github:umm/git

Usage

実装済のクラス

  • Git
    • git コマンドを同期的に実行
  • GitAsync
    • git コマンドを非同期的に実行
  • Hub
    • hub コマンドを同期的に実行
  • HubAsync
    • hub コマンドを非同期的に実行

実装済のサブコマンド

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

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

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

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

// 書き方を統一するために、空の 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

About

git command wrapper for Unity

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages