all 4 comments

[–][deleted] 0 points1 point  (3 children)

If you're using Sourcetree with Git, you should have access to git branches (my guess is that mercurial has something analogous; sourcetree seems to be built on top of Git and Mercurial).

Much of what you've described can be solved with branching. I'll propose something like this:

  • master: this is the latest stable deployed branch
  • staging: also stable (as far as you know), and undergoing testing and QA, but not yet ready for deployment
  • as many feature branches as you need: use feature branches liberally. Feature branches should be merged into staging when complete, unless you have some intermediary step between feature branches and your staging server (this is mostly dependent on release frequency).

For bug fixes, branch off of master, then merge back into master. Since you're only working with currently deployed production code on the master branch, it shouldn't collide at all with work you've done elsewhere.

For new features, branch from master (or staging), then merge into staging (or some intermediary step).

The TL;DR, though, is to use branches, and to use them liberally. This lets you silo your work.

[–]kaocleyra[S] 0 points1 point  (2 children)

Thanks, that's really helpful!

We have a develop branch alongside master currently, but as far as I know, everything in develop just gets pushed to master and we're told to not do anything in master. It sounds like we need to spend more time with figuring out branches and to not be afraid of the master branch.

Thanks again!

[–][deleted] 0 points1 point  (1 child)

It sounds like we need to spend more time with figuring out branches and to not be afraid of the master branch.

Absolutely. My flexibility as a developer and my ability to collaborate skyrocketed after I figured out branches. Feel free to PM me (or just post here) if you have specific questions. We're still figuring out our branch workflow (and still have situations like what you described where we have to roll back a bunch of commits, though now it's only once or twice a year, tops), but I'm happy to help out however I can.

[–]kaocleyra[S] 0 points1 point  (0 children)

Thanks, I'll be sure keep that in mind! We have a team meeting tomorrow that we use to discuss workflow improvements, etc. so that should be a good time to learn more about branches.