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