DEV Community

Discussion on: What is your git merge strategy?

Collapse
 
meanin profile image
Paweł Ruciński

Do you squash on your commercial work also? How about rolling back in history in case of any mistakes/bugs?

Collapse
 
joshuadiablito profile image
Joshua Anderson

Yeah, I squash in my commercial work too. Especially there :P mostly there's no need to roll back - and anything can be picked/rolled back when I'm not sure about it as a single commit. How you organise your work - small pieces of functionality, easy to understand, covered with 100% unit test coverage - means the need to roll back is pretty much non existent, and it is very unlikely that you would have a low understanding of why what you have created has caused a bug.

Thread Thread
 
meanin profile image
Paweł Ruciński

If you are working alone, that this is true. In larger teams, when you can get messy repo/feature branch then, in my opinion, is better to have more granular commits :)

Thread Thread
 
joshuadiablito profile image
Joshua Anderson

I have worked in FE projects with 30+ people contributing to a single repo, it worked fine for us :)

Thread Thread
 
meanin profile image
Paweł Ruciński • Edited

Nice, I am a little jealous.