1

Your current branch is master and if u create another branch like that git branch develop,then in branch develop you will have similar code about master。how can i get an empty branch.

Squonk
  • 48,735
  • 19
  • 103
  • 135
xulong
  • 49
  • 5

1 Answers1

1

You can create an orphan branch, which start without parent, and will be effectively "empty".

git checkout --orphan develop

This is since git 1.7.2: see "In git, is there a simple way of introducing an unrelated branch to a repository?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250