본문 바로가기

Git

commit --amend, rebase -i로 수정 시, git push --force 할 경우 'You are not allowed to force push code to a protected branch on this project.' 에러 발생 시 조치

GitLab에서 'Allowed to force push'를 허용해줘야 한다.

Project > Settings > Repository > Protected branches

Allowed to force push를 허용