【问题标题】:Reassigning local commits to a new branch in git [duplicate]将本地提交重新分配给git中的新分支[重复]
【发布时间】:2016-06-12 14:39:09
【问题描述】:

基本上我犯了一个错误。

在本地,我在 master 上进行开发,并且在 committingmerging 之外,因为 master 正在向前发展;当时间来到push 时,我意识到我希望将提交放在一个分支上,而不是在 master 上。

我无法存储,因为它已经提交,而且合并似乎使事情变得更加复杂。

如何将我的“本地”提交移动到新分支?

【问题讨论】:

    标签: git


    【解决方案1】:

    使用git rebase 和/或git cherry-pick。有关更多信息,请参阅他们的手册页。

    【讨论】:

      猜你喜欢
      • 2014-05-24
      • 1970-01-01
      • 1970-01-01
      • 2020-07-28
      • 1970-01-01
      • 2022-01-09
      • 2021-06-24
      • 1970-01-01
      • 2017-02-01
      相关资源
      最近更新 更多