【发布时间】:2012-02-03 01:28:10
【问题描述】:
我在 2 个分支上的 git 乱七八糟。 Frontend 包含大量正在进行的开发工作——它应该被分割成多个分支,而且有点混乱。
情况如下——frontend 在左侧,master 的顶部在右侧:
| frontend 1: newest commit (to be pushed)
| frontend 2: recent commit (to be pushed)
| frontend 3: week-old commit (this was a temporary save of lots of ongoing work - it probably should have been a stash. This one cannot be pushed)
|
| | master: this is the current state of the site
| | master: previous commit
| /
|/
| master before `git branch frontend`
在分支frontend,我想:
- 将
frontend 1和frontend 2转移到master以便现在可以推送。 - 'cancel'
frontend 3并将代码移回暂存,以便我可以正确提交(即不在大量的一般工作中)
我是 git 的初学者,我担心如果我继续输入命令以使其变得更好,我会造成更多的伤害(就像我已经做过的那样)。如果您能提供帮助,将不胜感激。谢谢。
【问题讨论】:
标签: git git-branch