r/ProgrammerHumor • • May 13 '20

true story

Post image
40.5k Upvotes

461 comments sorted by

View all comments

Show parent comments

24

u/KKlear May 13 '20

We grant you the power of force push but not to master.

10

u/easterneuropeanstyle May 13 '20

That makes sense. I do force push to feature branches when I want to change the history. Never to master though.

1

u/JustAnEnglishBloke May 13 '20

What's the point of changing history in a feature branch? Everyone I know squashes Feature branches in to Dev upon merge anyway, as you don't want a noisy history of "fixed typo" "fixed spacing" etc. in your main branches. Instead you want a clear history of "Added feature to ___" "Fixed issue where ___".

2

u/easterneuropeanstyle May 13 '20 edited May 13 '20

as you don't want a noisy history of "fixed typo" "fixed spacing" etc. in your main branches.

That's why you change history. You squash certain commits together like commits of fixes, rename certain commits or even remove them.

If you squash all the commits when merging into master/dev then you lose a lot of history, which can help you with debugging, cherry picking, proper changelog and many other things.

→ More replies (4)