i++

プログラム系のメモ書きなど

Git

gcloud : ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=].

gcloud source repos clone (リポジトリ名) --project=(プロジェクト名) で Google Cloud Platform 上のソースコードをクローンしようとしたときに発生。 ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=]. fatal: remote error: 解決方…

Git : コミットメッセージに自動でブランチ名を挿入する

Git

参考:How to add Git's branch name to the commit message? .git/hooks/ 下にある prepare-commit-msg.sample を prepare-commit-msg に変更する(.sample を外す) prepare-commit-msg に以下のようなスクリプトを追記する branchPath=$(git symbolic-ref…

Git : fatal: Failed to lock ref for update: No such file or directory

Git

エラーが発生した手順 sandbox/foo というブランチを作成する sandbox/foo/bar というブランチを作成しようとする エラーの原因 sandbox/foo というブランチを作成しようとした時点で、 git が sandbox 以下に foo というファイルを作成している sandbox/foo…