$ git push origin HEAD:refs/for/develop
을 실행했는데, git hooks
가 없다고 에러가 나는 경우가 있다.
remote: Resolving deltas: 100% (2/2) remote: Processing changes: refs: 1, done remote: ERROR: missing Change-Id in commit message footer remote: remote: Hint: To automatically insert Change-Id, install the hook: remote: gitdir=$(git rev-parse --git-dir); scp -p -P 29445 <url>:hooks/commit-msg ${gitdir}/hooks/ remote: And then amend the commit: remote: git commit --amend
처럼 알려주기 때문에
$ gitdir=$(git rev-parse --git-dir); scp -p -P 29445 <url>:hooks/commit-msg ${gitdir}/hooks/
을 실행하면 되는데, 가끔 잘 안될 때가 있다. 그럴 땐 .git/hooks/
폴더를 먼저 만들어두고, 저 스크립트를 실행하면 된다.
그런다음 기존 commit을 수정하면 Change-Id
가 자동으로 붙는다.