谢谢!
|
1
git checkout -b new-branch
|
|
2
你已经 commit 了吗?
已经 commit 的话可以开新的 branch,然后 cherry pick 没 commit 的话直接开新的 branch 就好了,active change 会带过去的 |
|
3
退回到 master 之前的 A 点,建新分支,然后把之前的内容 Squash 过来....
|
|
4
|
|
msg7086Jul 9, 2020 via Android
5
给当前提交打上新的分支标记,然后把 master 回退回去。
如果还没提交的话可以直接新建并切换分支。 |
|
7
git stash push
git checkout -b new_branch git stash pop |
|
zhuweiyouJul 10, 2020
8
直接开,会带过去的。
|
|
KentYJul 10, 2020
9
看起来你是没 push, 但是 committed already.
如果没 committed, 很容易 co -b 就可以了 已经 committed 了有个省心的法: 1) checkout -b newbranch 2)然后在你本地把 master branch 删了 3)pull 完事 |
|
dubenshuJul 10, 2020 via iPhone
10
没 commit
$ git stash $ git stash branch <new-branch> 已经 commit $ git checkout -b <new-branch> |
|
nuttingJul 10, 2020
11
有没有人说说已经提交的话,ui 界面上是怎么操作
|
|
ericguiJul 10, 2020
12
git branch -m "new-branch-name"
git fetch origin master basically, you'll need to reset the master branch. |
|
hantsyJul 10, 2020
13
如果 Push 了的话,可以尝试(记不得了, 以前这种事,我也出现过。):
1, 直接在 Master 建立分支。 2, 然后 Master 上 Reset --Hard 上个点,commit, push 。一般 --hard 还是慎用。 不过这种应该要避免,首先从切换到一个好的 Shell 开始(各种 OhMyXXX 系列),一般图形工具都是会标注当前分支。 |
|
yinftJul 10, 2020
16
直接开就能带过去哦
|
|
yinftJul 10, 2020
17
git checkout -b
|
|
julyclydeJul 10, 2020
18
1 把自己这个“本地 master”push 到远程的新分支
2 然后把自己本地 master“倒回去” |