Questions tagged [feature-branch]

134 questions
2152
votes
47 answers

How can I delete all Git branches which have been merged?

I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one?
Nyambaa
  • 31,433
  • 9
  • 27
  • 34
1261
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
  • 29,902
  • 21
  • 83
  • 125
349
votes
3 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
  • 4,183
  • 3
  • 15
  • 19
144
votes
4 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 it's master branch rebased nightly from the upstream SVN, and we are working on feature branches.…
kfb
  • 5,342
  • 6
  • 32
  • 46
45
votes
3 answers

git - 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,425
  • 2
  • 25
  • 33
43
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,…
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…
31
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
  • 661
  • 2
  • 7
  • 7
30
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,951
  • 1
  • 18
  • 22
23
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
  • 8,311
  • 4
  • 49
  • 75
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
  • 49,271
  • 50
  • 203
  • 302
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
  • 3,826
  • 1
  • 31
  • 60
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…
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
  • 38,521
  • 65
  • 199
  • 353
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
  • 3,184
  • 5
  • 28
  • 43
1
2 3
8 9