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

  • SEARCH
  • Home
  • 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 859045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:37:29+00:00 2026-05-15T08:37:29+00:00

I’m working on a relatively small, but fast-changing project (a web application) with a

  • 0

I’m working on a relatively small, but fast-changing project (a web application) with a few other developers. We’re using Git for source control.

We started out creating a stable branch which is what is deployed to the live production web server. The master branch is what is deployed to a secondary “unstable” server for testing purposes. Whenever we felt that the master branch was ready to go live, we merged it into stable.

However, we came to a point where we wanted one of the later master commits, but not some of the commits before it, so we used cherry-pick to pull that change into stable. This creates a new commit with the same change as the one in master, and it feels as if we’re losing the nice history that Git otherwise provides.

Are there better ways of handling this type of unstable/stable deployment model?

One solution I thought of was using feature branches, and only ever merging a feature branch into master once we want it to go live. Then we’ll tag every deployment instead of having a stable 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. Editorial Team
    Editorial Team
    2026-05-15T08:37:29+00:00Added an answer on May 15, 2026 at 8:37 am

    You’re correct in saying that this undermines the history git keeps by cherry-picking. The thing to think about here is, why do you not want the preceding commits on stable?

    (nb. if its some following commits that you aren’t ready to port yet, you can of course use git merge <commit-id> rather than cherry-pick to retain the history cleanly – future merges are also smart about not duplicating commits/changesets)

    If you don’t want them because they aren’t ready for mainline, or fully tested, what makes you confident that the desired commit (which depends on them and their state) is ready?

    If its because they aren’t ready for stable, and the commit that you want doesn’t depend on them, then you aren’t branching as effectively as you could be: that commit could have been on a seperate topic branch (which contains only the commits required for the feature you’re interested), then once you’ve determined that its good to hit stable, just merge that branch. You can then either rebase your other branches that need this feature onto stable, or just merge the feature-branch into them (once again, git is pretty smart here about future merges).

    It takes a little more discipline to think about the impact of your commits as you are working (since you’re already committing early and often ;), but it makes the branching/merging workflow much simpler – git checkout -b new-feature is your friend to quickly add a commit with other, unrelated changes in the middle of working in a topic-branch (or git checkout -b new-feature master if you are particularly well-disciplined and don’t have extra changes hanging around your work tree).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here is how I would do it: String txt =… May 15, 2026 at 8:35 pm
  • Editorial Team
    Editorial Team added an answer I can see some in terms of best practice but… May 15, 2026 at 8:35 pm
  • Editorial Team
    Editorial Team added an answer Cookies are separated by commas, so when you store the… May 15, 2026 at 8:35 pm

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.