LoginSignup
4
0

More than 5 years have passed since last update.

Sourcetreeでコミット時にovercommitを動くようにする

Posted at

概要

この記事で紹介されている様に、overcommitと呼ばれているgemを使えば、gitのhookを便利にできます。

ただ、SourceTreeなどの、Gitクライアントはgit commit時にovercommitのコマンドのパスが通っていなく、動作しない。
それを動作するようやりかたを記述する。

前提

この記事を見て、overcommitのコマンドが使えること

動かし方

以下のコマンドを用いて、CUIから、Sourcetreeを起動する。
open -a Sourcetree

rubocop設定例

PreCommit:
  RuboCop:
    enabled: true
    command: ['bundle','exec','rubocop'] # rubocopをbundle経由で実行する
    on_warn: fail # Treat all warnings as failures
4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0