I work in a small dev house with a handful of Devs, all with different ideas of how Git should work. This obviously causes chaos.
As "Senior Dev" (supposedly) I'm trying to bed down a coherent strategy for us to all follow, but I'm getting push-back from my old-school boss.
My suggestion is thus:
My boss doesn't like the idea of losing the detailed commit history in the squash, especially the "git-blame" detail when multiple devs are involved. My argument is that git-blame shouldn't replace comments, documentation and links to work items.
What say you, oh wise forum?
As "Senior Dev" (supposedly) I'm trying to bed down a coherent strategy for us to all follow, but I'm getting push-back from my old-school boss.
My suggestion is thus:
- Main, Test and Dev branches maintained as 1:1 with our deployed Live, Test and Dev environments. (We use the "Dev" environment for internal local testing)
- Feature branches are created off Dev, potentially with individual dev contribution branches off each feature branch (although it's usually 1 dev per feature).
- Squash commit from feature branch into Dev branch, deleting feature branch at the same time.
- If further changes are required for that feature, you create a new branch off Dev for that. Squash commit and delete when done.
- Changes are then merged up from Dev to Test to Main when needed.
- Branches for "Hot-fixes" (shudder) are made off the Test branch. When done, squash commit & delete, and deploy to Test for testing. Merge up to Main when done. Changes would obviously have to be merged down to Dev asap.
My boss doesn't like the idea of losing the detailed commit history in the squash, especially the "git-blame" detail when multiple devs are involved. My argument is that git-blame shouldn't replace comments, documentation and links to work items.
What say you, oh wise forum?
Last edited:

