9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git:ファイルのgit上でのパーミッションに実行権限を付加する方法備忘録

Posted at
  • たまに使うけど絶妙な頻度なので忘れている
  • ファイルのgit上のパーミッションを確認する方法は別途参照
  • gitのfilemodeがfalseのままでもOK
$ git ls-files -s
100755 66e9889e8b4aeea1af13e2396fb70594232a2ae3 0       bundle
100644 edf195985f692057c67e71d2f8b493ee3078a0d6 0       delayed_job
100755 5badb2fde0cb72bbb3cba8436721048dfd7e58dd 0       rails
100755 d87d5f578104597c1d1b951b55942e37f8af1277 0       rake
・
・
・
$ git update-index --add --chmod=+x delayed_job
$ git ls-files -s
100755 66e9889e8b4aeea1af13e2396fb70594232a2ae3 0       bundle
100755 17f9f6e90773c0a5d6b6d1d23d50033d0d6d3802 0       delayed_job
100755 5badb2fde0cb72bbb3cba8436721048dfd7e58dd 0       rails
100755 d87d5f578104597c1d1b951b55942e37f8af1277 0       rake
・
・
・

まとめ

git update-index --add --chmod=+x ファイル名で実行権限を付加し755にできる

9
7
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
9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?