大概这个意思,new_branch不要原master的内容和记录。
+---------+ +--------------+
|master | | new_branch |
| | | |
+-+-------+ +--------------+
|
|
v
+-+-------+
| |
|commit1 |
| |
+---------+
git checkout --orphan YourBranchName
然后
git reset --hard
参考自https://stackoverflow.com/questions/15034390/how-to-create-a-new-and-empty-root-branch