0

I have a git branch named master and I made some changes to some files. (No commit yet)

Now I realize "hey, these are some big changes.. I should branch off to a dev branch".

How do I take the changes I just made, bring them to a new branch dev and then undo the changes in the master branch?

4

1 回答 1

2

因为你还没有提交,所以你可以更改到一个新的分支(它master从那时开始分支)并在这个分支中提交。

git checkout -b dev
[...]
git commit
于 2013-10-16T06:26:37.080 回答