remote:
remote: Hint: to automatically insert a Change-Id, install the hook:
remote: gitdir=$(git rev-parse --git-dir); scp -p -P 29418 <주소>:hooks/commit-msg ${gitdir}/hooks/
remote: or, for http(s):
remote: f="$(git rev-parse --git-dir)/hooks/commit-msg"; curl -o "$f" <주소>/tools/hooks/commit-msg ; chmod +x "$f"
remote: and then amend the commit:
remote: git commit --amend --no-edit
remote: Finally, push your changes again
remote:
To ssh://gerrit.inca.co.kr:29418/TACHYON-UMS-Front
! [remote rejected] HEAD -> refs/for/tts (commit 25db55b: missing Change-Id in message footer)
error: failed to push some refs to 'ssh://gerrit.inca.co.kr:29418/<플젝명>'
위의 힌트대로
$ gitdir=$(git rev-parse --git-dir); scp -p -P 29418 <주소>:hooks/commit-msg ${gitdir}/hooks/
$ git commit --amend --no-edit
$ git push origin HEAD:refs/for/<브랜치명> 입력
근데 첫번째 줄 입력시 하단의 경우처럼
$ gitdir=$(git rev-parse --git-dir); scp -p -P 29418 <주소>:hooks/commit-msg ${gitdir}/hooks/
subsystem request failed on channel 0
scp: Connection closed
이런 오류가 나면
$ gitdir=$(git rev-parse --git-dir); scp -O -p -P 29418 <주소>:hooks/commit-msg ${gitdir}/hooks/
로 써준다
'FrontEnd Dev > GIT' 카테고리의 다른 글
[git] react에서 gh-pages 배포하기 (0) | 2024.01.23 |
---|---|
[gerrit git] rebase 오류 (0) | 2023.08.08 |
[gerrit git] 원격저장소 브랜치삭제 (0) | 2023.07.19 |
[git] 다른 브랜치를 따서 수정한 부분만 머지 (0) | 2023.05.08 |
[git] revert 되돌리기 (0) | 2023.04.28 |