I work in web development and the team I work on is growing so I see the need to hammer out a more formal Git workflow. We have a process down that is working for now but it's starting to cause more problems than it solves.
Currently, we work off of a dev
and master
branch. The dev
branch is checked out to our dev
environment, master
to our test
environment, and our prod environment is checked out to a tag from master
.
I've been reading up on Gitflow and a common theme is checking out feature branches from the dev
branch.
Our team tends to have a number of irons in the fire at one time, each with different timelines and can't necessarily follow a regular release schedule at this time. If Developer A checked out a new feature branch from dev
, made a quick fix, received approval, and pushed up to master
, then deployed to prod there's a good chance they'd unintentionally deploy code from Developer B that was being reviewed on the dev
environment.
To avoid this, our general practice has been to create feature branches off of master
as it's always reflective of what's on production. Then, merge them into dev
for review, then up to master
once approved.
A frequent thorn in my side is that over time the dev
environment gets "messy" due to its sandbox nature and will occasionally have abandoned features or tests that are left there and not necessarily cleaned up.
How can we improve this process? Is there a better workflow or process we should look into?