更新时间:2023-12-03 23:37:04
只需创建一个新分支:
git checkout -b newBranch
如果你做了 git status ,你会看到代码的状态没有改变,你可以将它提交给新的分支。
git status
And if you do git status you'll see that the state of the code hasn't changed and you can commit it to the new branch.
将未提交的更改移至新分支
git:切换分支并忽略没有提交的任何更改
Git:在没有提交的情况下创建新的分支时,对主分支的更改也会分支