Creating git branch based another branch

git, git-branch

Solution

To create a branch based on another branch, the simplest way is to first checkout the base branch, then create a new branch from there. If I understand your question right, that's exactly what you want to do.

Now, seeing as you are using the `-b` flag in your branching, you may have working changes that you want to keep. If that's the case, you should push them onto the stash, check out the base branch, create the new branch, and pop the stash.

Problem

I'd like to create local branch based on other branch. For example I type: `git checkout -b feature1 release1.1.3` After that I get: `fatal: git checkout: updating paths is incompatible with switching branches.` What is the problem with this ?

Original source

Related problems