Branching, in revision control is the duplication of an object under revision control so that modifications can happen in parallel along both branches.

learn more… | top users | synonyms

42
votes
13answers
6k views

To branch or not to branch?

Till recently my development workflow was the following: Get the feature from product owner Make a branch (if feature is more than 1 day) Implement it in a branch Merge changes from main branch to ...
31
votes
8answers
4k views

Is it a good practice to use branches to maintain different editions of the same software?

We have a product that has a few different editions. The differences are minor: different strings here and there, very little additional logic in one, very little difference in logic in the other. ...
26
votes
10answers
1k views

Do DVCSes discourage continuous integration?

Say there is a team of ten agile developers. Every day they each pick a task from the board, commits several changes against it, until (by the end of the day) they have completed the task. All ...
22
votes
7answers
1k views

how to stay efficient when a build is almost always broken

I work in a middle sized team which shares the same source code and while have a continues integration in place, but as all of us has to work in the same branch, the build is almost always broken. ...
21
votes
4answers
2k views

I am a git user confused by mercurial's branching. How am I supposed to track small changes?

I've always used git before, but I want to contribute to python so now I have to learn mercurial and I find it very frustrating. So, I've made a couple of small patches and I wanted to track them as ...
18
votes
6answers
919 views

What does “branching is free” mean in Git?

What does "branching is free" mean in Git? I hear this a lot whenever Git is mentioned in comparison to other version control systems. I haven't had the opportunity (?) to deal with others (SVN, ...
18
votes
4answers
1k views

What is the best way to handle product versioning and branching of long term projects?

In a general sense, for long term projects that may have multiple releases during the products life cycle and require support of previous products, what is the best way to handle product versions and ...
17
votes
10answers
2k views

How do you avoid working on the wrong branch?

Being careful is usually enough to prevent problems, but sometimes I need to double check the branch I'm working on (e.g. "hmm... I'm in the dev branch, right?") by checking the source control path of ...
17
votes
6answers
718 views

When should I stop committing to master on new projects?

Whenever a new project starts, it usually makes sense to start by committing straight to master until you've got something "stable", and then you start working in branches. At least, this is how I ...
15
votes
6answers
759 views

How can I refactor a code base while others rapidly commit to it?

I'm on a private project that eventually will become open source. We have a few team members, talented enough with the technologies to build apps, but not dedicated developers who can write ...
15
votes
2answers
7k views

Git branching and tagging best practices

I am currently learning to use Git by reading Pro Git. Right now I'm learning about branching and tags. My question is when should I use a branch and when should I use a tag? For example, say I ...
14
votes
3answers
3k views

When using Git, is using the master branch for active development advisable?

First, some background, we are in the process of moving all of our project teams over to using git and are in the process of laying down the guidelines for how the repositories should be organized so ...
14
votes
3answers
659 views

Strategy for code review before merge to master from feature branches

Me and my team use feature branches (with git). I'm wondering which is the best strategy for code review before merge to master. I checkout a new branch from master, lets call it fb_#1 I commit a ...
12
votes
7answers
705 views

Can branching ever be considered a bad practice? [duplicate]

Possible Duplicate: To branch or not to branch? A co-worker is against branching. I use branching all the time. I put the team onto a basic 3 branch system. I create my own feature ...
10
votes
3answers
587 views

Git: Fixing a bug affecting two branches

I'm basing my Git repo on A successful Git branching model and was wondering what happens if you have this situation: Say I'm developing on two feature branches A and B, and B requires code from A. ...
10
votes
4answers
1k views

Why do git commits not contain the name of the branch they were created on?

When working with git in a team using feature branches, I often find it difficult to understand the branch structure in history. Example: Let's say there was a feature branch feature/make-coffee, ...
10
votes
3answers
174 views

Which is better for small bug fixes and small features - naming branches by ticket number or naming them by feature description?

I am in the middle of a disagreement (cordial, of course) with my lead about proper branch naming. This applies to bug-fix and small feature branches, not long-running feature branches. For ...
10
votes
2answers
882 views

A decent git branching model for products that should accompany the version of another, third-party product (and pros and cons of one proposal)

Note: My question is focused in my specific problem (which involves Liferay) but I hope it can be useful for anyone who needs to maintain various versions of a same project on git. I work on a ...
9
votes
4answers
1k views

How do you put different versions of your library under version control? Do you use tags? Or branches? Or another method?

I have recently started putting my code under version control (in the lab I'm working, under SVN, and my own codes in github (obviously with git)). Before using version control, I used to do something ...
9
votes
3answers
322 views

How to refactor when all your development is on branches?

At my company, all of our development (bug fixes and new features) is done on separate branches. When it's complete, we send it off to QA who tests it on that branch, and when they give us the green ...
9
votes
4answers
299 views

When is it appropriate to start using the next revision of a tool when dogfooding?

Specifically, I am working on a tool that integrates a DVCS and build system, but I image the challenge I am facing would arise for anyone developing a "meta" tool (compiler, VCS, build system, test ...
9
votes
3answers
343 views

dvcs - is “clone to branch” a common workflow?

I was recently discussing dvcs with a coworker, because our office is beginning to consider switching from TFS (we're a MS shop). In the process, I got very confused because he said that although he ...
9
votes
5answers
390 views

Is it a good practice to have a remote branch for each developer?

Is it considered a good practice to have a remote branch for each individual developer in the project? We're using Git with the following branches: master release develop If each developer had ...
8
votes
6answers
501 views

hginit - #ifdefs ridiculous

I was reading Joel Spolsky's mercurial introduction when it struck me: "And now what they do is this: each new feature is in a big #ifdef block. So they can work in one single trunk, while ...
8
votes
7answers
441 views

How to keep the trunk stable when tests take a long time?

We have three sets of test suites: A "small" suite, taking only a couple of hours to run A "medium" suite that takes multiple hours, usually ran every night (nightly) A "large" suite that takes a ...
8
votes
3answers
2k views

Source Control: Roles and Responsibilities - Best Practices

I'm looking for "Best Practices" concerning roles and responsibilities, specifically who is responsible for merges from development branches to trunk (or main). Basically I'm looking for ammunition to ...
8
votes
2answers
832 views

Should you bother with SVN branches if you only ever have one?

If we only work with one branch in Subversion, should we even bother? Can't we just work on the trunk to speed things up? This is how we develop with Subversion: There is a trunk We make a new ...
7
votes
2answers
2k views

Is a merging strategy like Git Flow really an anti-pattern?

My company is using Git, and is using a peculiar branching scheme - work is done in master, and branches are reserved for releases. This works fine, so long as all of the work done in an iteration ...
7
votes
3answers
616 views

Branching breaks continous integration?

I think this article, A Successful Git Branching Model, is very well known among experienced DVCS users. I use hg mostly, but I would argue this discussion is fine for any DVCS. Our current ...
7
votes
6answers
354 views

Branching Strategy for Test Environment

We will be starting a new project this month. The project will be 1 year and production deployment will only occur towards the end of the project. We will be doing iterative development (1 month per ...
7
votes
1answer
257 views

Git bug branching convention

I've been following the successful Git branching model guide for most of my development. I still wonder if the way I handle bug tickets is correct. My current workflow: Once I accept a bug ticket I ...
6
votes
6answers
544 views

What's the best way to explain branching (of source code) to a client?

The situation is that a client requested a number of changes about 9 months ago which they then put on hold with them half done. They've now requested more changes without having made up their mind ...
6
votes
3answers
199 views

Advice: Developing two projects where one is an extension of the other

The Two Projects I work at a pretty small software company, and I'm currently in a situation where I'm at the end of development for "Project A", about to start development for "Project B". Project B ...
6
votes
2answers
435 views

Feature branches, beta branches, and scrapped features

I've been thinking a lot about best practices regarding branching in distributed version control systems such as git an mercurial (the two dvcs's I have experience with and use on a daily basis). The ...
6
votes
3answers
2k views

When should development branches be created?

We are moving our project's team from using a single Main/Trunk branch, to multiple Development/Work branches that should be regularly merged into Main. We're basing our new process on this article ...
6
votes
1answer
1k views

Mercurial branch or rebase?

After using mercurial daily for over a year, we are about to find a better workflow for our DVCS. Inspired by a successful Git branching model we are about to move away from our "push daily work into ...
5
votes
5answers
5k views

Choosing the right branching strategy for releases

Starting with a new dev team on a new project and we have to define our Branching strategy for our source repository (e.g. Microsoft Team Foundation Server 2010). We've run into a sticky discussion ...
5
votes
2answers
389 views

How to deal with undesired commits that break long-running release builds?

We ran into an unfortunate situation at work recently and I've been wondering what we can do to avoid similar problems in the future. We make embedded systems. The FPGA code is in one SVN repository ...
5
votes
3answers
435 views

Forgetting to merge changes from trunk to branch

Recently, I forgot to merge changes from trunk to our maintenance branch. This caused us to rebuild - twice - and put QA on hold for two days while we fixed the mess. Normally, when committing to ...
5
votes
4answers
347 views

Git: rebasing on top of a refactor that affects the target rebase branch

Let's say I have a feature (topic) branch that I keep rebased on top of my development branch. During the course of the project (before merging in my feature branch), I decide that I need to make a ...
5
votes
1answer
281 views

Is there an established or defined best practice for source control branching between development and production builds?

I struggled in how to phrase my question, so let me give an example in hopes of making more clear what I am after: I currently work on a dev team responsible for maintaining and adding features to a ...
4
votes
3answers
231 views

Getting started with repositories: are they what I need, or are there any alternatives?

I'm a solo iOS developer - mostly self taught, but have made several successful apps so far and potentially starting some slightly bigger projects. What I want to do: As I'm working on some bigger ...
4
votes
1answer
497 views

Is git-flow in the spirit of git? [closed]

The question is pretty self-explanatory. I've had some experience with git-flow, and not much more true experience with plain git before that. (I was using it more as a backup-provider.) I'm ...
4
votes
6answers
678 views

How to set up for selective pushing with Mercurial?

I have a situation, when I'm working on a project, but at same time small issues arise which require quick fix. I would like to push just the fixes for these problems to the main repo while keeping ...
4
votes
1answer
229 views

Obstacles to using Git Flow in Subversion

My team at work is starting a new project, using Subversion as our VCS (you may consider this set in stone for the purpose of this question). We're still in the early stages of the project and are ...
4
votes
2answers
183 views

How to manage releases with multiple features at different states?

We have a branching structure of: multiple dev branches for each major new feature Main branch, merged into from a dev branch once a feature is ready for testing Release branch, merged into from ...
4
votes
4answers
1k views

Subversion Tools To Help With Branching and Merging

Our shop is about to release a major rewrite of our application. And, we are going to need to do bug fixes on versions out in the field while developing new features for the next version. Frankly, ...
4
votes
2answers
2k views

When to reintegrate feature branch?

From SVN 1.5, it supports reintegrate feature. I wonder when I should reintegrate. Should it be done before release or after release? If I do it Before release Pro: It is not forgettable to merge ...
4
votes
1answer
101 views

Make a change that is ignored by future merges

I have a git repository, and I'd like to make a "debug" branch. In the "debug" branch, I'd like to add a line: debug = true; But I want to make sure that any merges back to master ignore that ...
4
votes
3answers
865 views

Git: rebasing and keeping current to a remote branch - accepted practices?

When developing on a long-running branch (here defined as living longer than one release), what's the most accepted practice(s) to keeping the branch current with its origin while keeping the history ...