re: why branching on git is wrong VIEW POST

TOP OF THREAD FULL DISCUSSION
re: i don't understand how to maintain the code clean doing this.
 

sonarqube.org/

Use that, for example. Then you put up a CI Server that takes those metrics and executes the test and marks the commit as good or bad. If bad you remove that commit and make the developer pay for the next beers.

 

If I have to remove bad commits why not keep the stable code clean in the first place using branches.

 

If bad you remove that commit and make the developer pay for the next beers.

Removing that commit means you just doubled the merge conflicts and made bisecting impossible.

Sonarqube and CI work way better with Pullrequests where the commit is rated before being integrated into development. Have a single clean mergecommit instead of having a ton of reverts and "fixed spelling" on your mainbranch.

If you need to have a single Branch for your CI to work
you should configure your CI properly (build once after every push, always merge locally with target before building, let CI handle the final merge into target once the PR has enough approvals and a clean build) instead of giving up on branching and PRs.

If you need to have a single branch because of conflicts you need to rebase more often and most importantly keep your issues and thus your PRs smaller.

code of conduct - report abuse