Push rejected due to branch protection rule #170641
Replies: 5 comments
-
| The error means your branch is protected, and GitHub won’t allow merging until all required checks pass. To fix it: 
 If you don’t control branch protection, you may need to ask a repository admin to adjust the rules. | 
Beta Was this translation helpful? Give feedback.
-
| Thanks for posting in the GitHub Community, @PierreAndre8099! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category, the Discussions category is solely related to conversations around the GitHub product Discussions. This question should be in the  | 
Beta Was this translation helpful? Give feedback.
-
| You’re pushing to a protected branch and the required checks (build-and-test, lint) aren’t green. GitHub blocks the push (GH014) until those pass. Fix steps 
 Previous cases (similar): | 
Beta Was this translation helpful? Give feedback.
-
| 1️⃣ Check aur fix errors locally Terminal me repo root pe ja: cd /path/to/your/repo Required checks run kar: Node.js project examplenpm install      # dependencies install Jo bhi errors aaye, unko fix kar aur save kar. 2️⃣ Commit changes 3️⃣ Push to a feature branch, not directly protected branch 4️⃣ Open a Pull Request (PR) GitHub pe jaake PR create kar from my-feature-branch → protected-branch. CI automatically checks run karega. Jab build-and-test + lint green ho jaye → merge kar de. 💡 Important points: Protected branch me direct push nahi hota jab required checks fail ho. Always fix errors locally → push feature branch → open PR. Agar check names changed hai, workflow ya branch protection rules update karna pad sakta hai. | 
Beta Was this translation helpful? Give feedback.
-
| 🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as  2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the  Thank you for helping bring this Discussion to a resolution! 💬 | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion Type
Product Feedback
Discussion Content
Hello, everyone.
I have met some errors during merge data.
How can I fix it.
remote: error: GH014: Push rejected due to branch protection rule
remote:
remote: - Required status checks are failing.
remote: ————————————————————————————————————————————————
remote: The following checks didn’t pass:
remote: - build-and-test
remote: - lint
remote:
remote: Please ensure all required checks pass before pushing to the protected branch.
remote:
remote: Learn more about branch protection rules:
remote: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/about-protected-branches
Please someone help me.
Beta Was this translation helpful? Give feedback.
All reactions