anatawa12 / git-vrc

A command line extension for git to reduce meaningless diff on git of VRC project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git-vrc

Git VRC は VRC のプロジェクトで発生する意味のない diff をへらすための git 拡張です。

ローカル環境でのみ意味のある値を .asset.prefab.unity ファイルから git の上でのみ削除します。

Installation

このツールはリリースされてませんが、 cargo を使用して以下のコマンドでインストール可能です。

このツールは zip ファイル、 linux と macos 向けに homebrew、 windows 向けに msi インストーラで公開する予定です。

# もし rust をインストールしていなければ、以下のリンクの通り rust をインストールしてください。
# https://www.rust-lang.org/tools/install
$ cargo install --locked --git 'https://github.com/anatawa12/git-vrc.git'

このツールを git にインストールするため、以下のコマンドを実行してください。

# もしこのツールをシステム全体(git config の --system と同等)にインストールしたい場合
$ sudo git vrc install --config --system
# もしこのツールをユーザー単位(git config の --global と同等)にインストールしたい場合
$ git vrc install --config --global

また、 .gitattributes をレポジトリに追加するため、以下のコマンドを実行してください。

$ cd /path/to/YourUnityProject
$ git vrc install --attributes
$ git add .gitattributes

または以下のような .gitattributes ファイルを作成してください。

*.asset filter=vrc eol=lf text
*.prefab filter=vrc eol=lf text
*.unity filter=vrc eol=lf text

最後に、もしすでに unity のファイルを git にコミットしたことがある場合、 git に再 index してもらうため以下のコマンドを実行してください。

# レポジトリ内のファイルすべてを touch することで、 git に再 index してもらいます。
# all files in your repository to let git re-index files.
$ find . -type f -print0 | xargs -0 touch
# そしてコミットします
$ git commit -am "chore: start using git-vrc"

License

Apache License, Version 2.0 または MIT license のどちらかお好きな方でライセンスされています。

About

A command line extension for git to reduce meaningless diff on git of VRC project.

License:Apache License 2.0


Languages

Language:Rust 100.0%