Google Apps Scriptの開発において、clasp.json
はGitにコミットすべきかどうかは、そのファイルが何を含んでいるかによります。clasp.json
は通常、プロジェクトの設定情報を含んでおり、それ自体はGitで管理することが推奨されています¹²³。
ただし、clasp.json
に機密情報(例えばAPIキーなど)が含まれている場合、それらの情報が公開リポジトリに漏れることを防ぐために、このファイルを.gitignore
に追加することが推奨されます¹。その代わりに、機密情報を除いた設定ファイルを別途作成し、それをGitで管理することが一般的です。
したがって、clasp.json
をGitにコミットするかどうかは、その内容とプロジェクトの要件によります。機密情報を適切に管理しつつ、必要な設定情報をチームメンバーや他の開発者と共有できるようにすることが重要です¹²³。
ソース: Bing との会話 2023/10/20 (1) GASに入門して, Claspを使ったGit管理+Gitlab-CIを使ったCI .... https://qiita.com/sparklingbaby/items/3f1e07f78573b5c3b66b. (2) claspの導入でGoogle Apps Scriptのローカル開発&git管理を .... https://qiita.com/unsoluble_sugar/items/ca4a3ffb67dbed5dc54c. (3) claspでGAS(GoogleAppsScript)ファイルをGit管理する。 – kin29 .... https://kin29.info/claspでgasgoogleappsscriptファイルをgit管理する。/. (4) visual studio - Should I ignore the launchSettings.json file from .... https://stackoverflow.com/questions/47377058/should-i-ignore-the-launchsettings-json-file-from-being-committed-in-git. (5) package-lock.json - in GIT or not? - DEV Community. https://dev.to/adamklein/package-lock-json-in-git-or-not-50l5. (6) undefined. https://qiita.com/zaki-lknr/items/b4954c222c1c1db92caf. (7) undefined. https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=xxxxxxxxxx. (8) undefined. https://script.google.com/home/usersettings.