A Git hook to prevent committing directly to main

🫧 Open on Bubbles At work, we use a standard Git workflow: develop on a feature branch, push to GitHub, and open a pull request to main . Once somebody else approves the PR, the changes get merged. At least once a week, I forget to branch and commit changes directly to my local main . I only realise my mistake when I try to push and GitHub blocks me. To untangle myself, I have to create a new branch with my current state, push that instead, and then reset my local main back to origin so I can pull other peo

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论