LoginSignup
89
95

More than 5 years have passed since last update.

(よく忘れるので)gitのパーミッション操作の復習

Posted at

+xなファイルがgit管理側に反映されてなくてそのまま実行しようとしてコケた、という反省を元に今更メモ。

環境

  • OSX 10.9.5
  • git version 2.1.0

git

パーミッションの変更を無視する設定

設定する

$ git config core.filemode false

確認する

$ git config -l |grep filemode

gitに対して明示的にパーミッションを教えてあげる

実行権限を付与するとき

$ git update-index --add --chmod=+x [filename]

実行権限を外すとき

$ git update-index --add --chmod=-x [filename]

参考

89
95
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
89
95