本方案借助IDEA的git GUI界面,命令行方式同理。 Step 1:123git checkout --orphan tempgit add .git commit -m "initial commit"