zahra zamani
zahra zamani

Reputation: 1375

How can I create a new branch on develop?

I use git flow and there are two branches called develop and master How can I create a new branch on develop? Things I do:

git checkout develop
git flow feature start brokerage-branch

But this branch is created on the master

Upvotes: 1

Views: 2251

Answers (3)

Matt
Matt

Reputation: 13973

The base branch for features (normally develop in Git Flow) can be configured and is likely set to master in your case. You can change it back to develop like this:

git config --local gitflow.branch.develop develop 

When you start a new feature with git flow feature start xyz, it does not matter on what branch you currently are. The new feature branch is created from the configured branch.

Upvotes: 3

Chandella07
Chandella07

Reputation: 2117

A example demonstrating a Feature Branch Flow is as follows.

git checkout master
git checkout -b develop
git checkout -b feature_branch

and in your case, it should checkout develop branch first and then try creating new feature

git flow init  # initialize gitflow
git branch  # check git branch here
git flow feature start feature_branch  # create feature branch 

Upvotes: 2

Muh Fadjar Rhomadoni
Muh Fadjar Rhomadoni

Reputation: 371

Based on this link http://danielkummer.github.io/git-flow-cheatsheet/

feature start should be created from develop branch

Upvotes: 1

Related Questions