【发布时间】:2017-07-20 13:25:58
【问题描述】:
所以我有以下情况:
我在本地提交了一些工作,没有推送到远程存储库。我想把这个本地代码移动到另一个分支,因为如果我拉,会有修改会破坏我在本地放置的所有工作。
这是git status 在旧分支上的输出:
On branch <branch_name>
Your branch is ahead of 'origin/<branch_name>' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
这是git status 在新创建的分支上的输出:
On branch <branch_name>
nothing to commit, working directory clean
【问题讨论】:
-
其他分支是否已经存在,还是需要现在创建一个?
-
我已经使用“git checkout -b
”创建了它 -
类似,唯一不同的是我没有拉任何新的修改。
标签: git