Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 73485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:12:32+00:00 2026-05-10T20:12:32+00:00

What are the best practices and rules-of-thumb to follow while maintaining code? Is it

  • 0

What are the best practices and rules-of-thumb to follow while maintaining code? Is it good practice to have only the production ready code in the development branch, or should untested latest code be available in the development branch?

How do you guys maintain your development code and production code?

Edit – Supplementary question – Does your development team follow ‘commit-as-soon-as-possible-and-often-even-if-the-code-contains-minor-bugs-or-is-incomplete’ protocol or ‘commit-ONLY-perfect-code’ protocol while committing code to DEVELOPMENT branch?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:12:33+00:00Added an answer on May 10, 2026 at 8:12 pm

    Update 2019:

    These days, the question would be seen in a context using Git, and 10 years of using that distributed development workflow (collaborating mainly through GitHub) shows the general best practices:

    • master is the branch ready to be deployed into production at any time: the next release, with a selected set of feature branches merged in master.
    • dev (or integration branch, or ‘next‘) is the one where the feature branch selected for the next release are tested together
    • maintenance (or hot-fix) branch is the one for the current release evolution/bug fixes, with possible merges back to dev and or master

    That kind of workflow (where you don’t merge dev to master, but where you merge only feature branch to dev, then if selected, to master, in order to be able to drop easily feature branches not ready for the next release) is implemented in the Git repo itself, with the gitworkflow (one word, illustrated here).
    See more at rocketraman/gitworkflow. The history of doing this vs Trunk-Based-Development is noted in the comments and discussions of this article by Adam Dymitruk.

    https://github.com/rocketraman/gitworkflow/raw/master/docs/images/topicgraduation.png

    (source: Gitworkflow: A Task-Oriented Primer)

    Note: in that distributed workflow, you can commit whenever you want and push to a personal branch some WIP (Work In Progress) without issue: you will be able to reorganize (git rebase) your commits before making them part of a feature branch.


    Original answer (Oct. 2008, 10+ years ago)

    It all depends of the sequential nature of your release management

    First, is everything in your trunk really for the next release? You might find out that some of the currently developed functions are:

    • too complicated and still need to be refined
    • not ready in time
    • interesting but not for this next release

    In this case, trunk should contain any current development efforts, but a release branch defined early before the next release can serve as consolidation branch in which only the appropriate code (validated for the next release) is merged, then fixed during the homologation phase, and finally frozen as it goes into production.

    When it comes to production code, you also need to manage your patch branches, while keeping in mind that:

    • the first set of patches might actually begin before to first release into production (meaning you know you will go into production with some bugs you can not fix in time, but you can initiate work for those bugs in a separate branch)
    • the other patch branches will have the luxury to start from a well-defined production label

    When it comes to dev branch, you can have one trunk, unless you have other development efforts you need to make in parallel like:

    • massive refactoring
    • testing of a new technical library which might change the way you calls things in other classes
    • beginning of a new release cycle where important architectural changes need to be incorporated.

    Now, if your development-release cycle is very sequential, you can just go as the other answers suggest: one trunk and several release branches. That works for small projects where all the development is sure to go into the next release, and can just be frozen and serve as a starting point for release branch, where patches can take place. That is the nominal process, but as soon as you have a more complex project… it is not enough anymore.


    To answer Ville M.’s comment:

    • keep in mind that dev branch does not mean ‘one branch per developer’ (which would trigger ‘merge madness’, in that each developer would have to merge the work of other to see/get their work), but one dev branch per development effort.
    • When those efforts need to be merged back into trunk (or any other ‘main’ or release branch you define), this is the work of the developer, not – I repeat, NOT – the SC Manager (who would not know how to solve any conflicting merge). The project leader may supervise the merge, meaning make sure it starts/finish on time.
    • whoever you choose for actually doing the merge, the most important is:
      • to have unit tests and/or assembly environment in which you can deploy/test the result of the merge.
      • to have defined a tag before the beginning of the merge in order to be able to get back to previous state if said merge proves itself too complex or rather long to resolve.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 72k
  • Answers 72k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You could just generally use Apache in front of your… May 11, 2026 at 1:49 pm
  • added an answer It is hard to help without any details, but note… May 11, 2026 at 1:49 pm
  • added an answer I have implemented a workaround, see code below. I judged… May 11, 2026 at 1:49 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.