且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将未提交的更改移至新分支

更新时间:2023-12-03 23:37:04

只需创建一个新分支:

git checkout -b newBranch

如果你做了 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.