Forcibly copying a branch from another branch?

Viewed 152
$ git branch -C pommi  # works fine, creates branch forcibly out of currently checkedout branch.
$ git branch -C pommi master  # gives error, why???
fatal: Cannot force update the current branch.

I know that -C is for forcibly copying the branch, when a branch already exists with the same name. How can I create a force copy by explicitly specifying the branch name(which is not checked out) of the source branch to copy?

1 Answers

Acutually, it was a problem in understanding the syntax for copying, its like

git branch -C sourceBranch targetBranch

So, It's solved, Thanks StackOverflow, and community people.

Related