What is the first thing to check when a developer says "my push is rejected"?
BeginnerProductionRecovery and incident handling
Answer
Read the exact message. fetch first means pull or rebase; protected branch hook declined or GH006 means the branch rules require a PR; GH013 or secret detected means push protection blocked a secret; remote: error: File ... exceeds GitHub's file size limit means a file over 100 MB.
More on Recovery and incident handling
Someone force-pushed over main and 12 commits vanished. How do you recover?IntermediateAfter recovery, what do you change so a force-push to main cannot happen again?AdvancedA bad migration commit was deployed. Walk through your response in the first 15 minutes.IntermediateHow do you recover a deleted repository or branch on GitHub?IntermediateHow do you find who or what pushed a specific commit to a protected branch?AdvancedCI is red on main after a merge. What is your policy?Intermediate