LoginSignup
0
0

More than 3 years have passed since last update.

【git】error: failed to push some refs to [githubのURL]プロテクトされたブランチにプッシュした場合

Posted at

共同開発を初めて、初期に出たエラーです。
なんとも簡単なエラーですが、自分の戒めとして備忘録として載せておきます。

プロテクトされたブランチにプッシュしちゃった

ターミナル
git push origin HEAD
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 1000 bytes | 1000.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/develop.
remote: error: At least 1 approving review is required by reviewers with write access.
To https://githubのURL
 ! [remote rejected] HEAD -> develop (protected branch hook declined)
error: failed to push some refs to 'https://githubのURL'

本来なら新しいブランチを切って、そこから開発用であるdevelopブランチにプッシュするのですが、ロックされているdevelopブランチに直でプッシュしちゃいました。
1つのエラー事例として参考になれば幸いです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0