Ask HN: What's your Git workflow like at work? What could be improved?
For various reasons I am revisiting “everything I know”. One that crops up the most is handling multiple developers on the same project. We can try stand ups and designs and coffee breaks but in the end it’s the code that matters
Most “corporate” developers seem to have a branch master then merge, and release on a time based cycle, approach, but it seems rarer to find approaches such as the Linux kernel or git.git
I suspect there are far more pain points in the simplified approach (pulling a patch already in master is terrifying to most developers)
Any thoughts ?
(
10 comments
| 3 points
| on HN
)
- “architect” becomes an actual Meaningful term - they are the upstream merge maintainers. Eventually a company is one big monorepo and the CTO should probably be the “Torvalds” for that compmay.
- most lines of business are the users - but could also contribute patches and even patch their own services while they wait.
- most development would benefit a lot from a proposed updates branch - trying to go from zero to fully tested feature in one branch while keeping that JIRA uptodate is tough
- lots more feature flags. One thing I have tried but feels like it ought to work better is to slide whole modules in under feature flags
https://git-scm.com/docs/gitworkflows
I can’t think of a better way for teams as they can agree on Github etc. and sync up in real time. If there is little command structure and time overlap the mailing list way probably works better although Github is popular so…
I usually pull from staging include a number of changes from various branches merged into staging or things directly committed to the staging branch. Test everything and push a release, inform stakeholders, etc.
Any change to production will merge back to staging so everything stays in sync.
Feature branches that usually always pass CI (so you can easily roll back to a working deployable state)
Pain points: -coming up with good commit messages -including the story ticket number in the branch name and commit message
- master
- develop -> /feature/ticket#_short_desc -> pullrequest to develop
- create /release/next_versionnumer (year.release_month.build#)
-> after prod release -> merge back into master and develop branch
commit message structure: "ticket#: fix/add/del - short description"