Questions tagged [feature-branch]
139 questions
2585
votes
51 answers
How do I delete all Git branches which have been merged?
How do I delete branches which have already been merged? Can I delete them all at once, instead of deleting each branch one-by-one?

Nyambaa
- 38,988
- 9
- 29
- 35
1352
votes
11 answers
Git merge hotfix branch into feature branch
Let’s say we have the following situation in Git:
A created repository:
mkdir GitTest2
cd GitTest2
git init
Some modifications in the master take place and get committed:
echo "On Master" > file
git commit -a -m "Initial commit"
Feature1 branched…

theomega
- 31,591
- 21
- 89
- 127
432
votes
5 answers
Rebase feature branch onto another feature branch
I have two (private) feature branches that I'm working on.
a -- b -- c <-- Master
\ \
\ d -- e <-- Branch1
\
f -- g <-- Branch2
After working on these branches a little…

Arjen
- 5,043
- 4
- 18
- 20
171
votes
6 answers
Rebasing remote branches in Git
I am using an intermediate Git repository to mirror a remote SVN repository, from which people can clone and work on. The intermediate repository has its master branch rebased nightly from the upstream SVN, and we are working on feature branches.…

kfb
- 6,252
- 6
- 40
- 51
50
votes
3 answers
Create a branch alias?
I am researching switching from starteam to Git.
Currently, in starteam, we use "floating views" with special names. These floating views basically work like aliases. Therefore, we can specify a specific alias to checkout from and we'll get the…

user606723
- 4,918
- 2
- 27
- 34
48
votes
3 answers
Feature Toggles vs Feature Branches
What are "Feature Toggles" and "Feature Branches" and what's the difference between them?
What are the pros and cons? Why is one better than the other?
I found some articles on Google regarding this, and I tend to be in the "Feature Toggles" camp,…

Sergiu
- 1,397
- 1
- 18
- 33
38
votes
4 answers
How to continuously build and deploy feature branches with Maven?
My team is using feature branches to implement new features and continuously deploys snapshot builds into a remote repo for our users to use. Thus 'deploy' really only means 'distributing to a remote Maven repository'. We're currently only running…

Oliver Drotbohm
- 80,157
- 18
- 225
- 211
33
votes
3 answers
How does one work on a new git branch that depends on another git branch that is not yet merged?
Here's my scenario:
My project is following the topic branching pattern.
I create a branch to fix some problems, let's call this branch problem_fixes. I make my changes, and submit a pull request.
I need to start work on a new feature, so I create…

mtjhax
- 1,988
- 1
- 18
- 23
33
votes
2 answers
How to merge git commits in the develop branch to a feature branch
I have a develop branch and a feature branch in my git repo. I added a commit to develop and now I want that commit to be merged to my feature branch. If I do this
git checkout feature
git merge develop
I end up with a merge commit. Since I'll be…

gitq
- 741
- 2
- 7
- 7
27
votes
4 answers
What to do with experimental non-merged git branches?
What are the current best practices with git branches that have been created to test out a solution to a bug and have not been merged because the review process show that they are wrong or there are better solutions to the problem?
An example.…

gioele
- 9,748
- 5
- 55
- 80
23
votes
4 answers
Is using “feature branches” compatible with refactoring?
“feature branches” is when each feature is developed in its own branch and only merged into the main line when it has been tested and is ready to ship. This allows the product owner to choose the features that go into a given shipment and to “park”…

Ian Ringrose
- 51,220
- 55
- 213
- 317
12
votes
2 answers
How would I configure TeamCity to support a GitHub pull-request model for source-code integrations?
We use TeamCity and GitHub Enterprise. We use an open-source-esque workflow with git: there's a mainline repository for each component, and when people want to make changes, they
fork mainline to their own account (so there might be many…

Peter Mounce
- 4,105
- 3
- 34
- 65
12
votes
1 answer
Merging Git Flow Feature Branch after Hotfixes?
I just recently started using git flow and there's something I don't quite understand. First, I never do anything directly on develop. If I do something I either use a start a hotfix or feature.
My plugin was at version 1.1.5 when I started a new…

FueledPublishing
- 241
- 2
- 9
11
votes
4 answers
Bug fixes in a feature branch
We're using a A successful Git branching model by Vincent Driessen for our branching model. All's fine but I haven't really seen a particular issue brought up.
From what I've understood, when a new feature is required, you branch of the development…

Mridang Agarwalla
- 43,201
- 71
- 221
- 382
11
votes
2 answers
GIT Rebase a Branch that is collaborated on?
After reading this article, it makes sense to rebase to gather changes from the main branch on to my feature branch:
Git workflow and rebase vs merge questions
clone the remote repo
git checkout -b my_new_feature
..work and commit some stuff
git…

Zhao Li
- 4,936
- 8
- 33
- 51