我在错误的分支上进行了更改。我还没有承诺。如何将我的更改提交到预期分支?
- 我在 A 分支并进行了更改。
- 尚未添加或提交更改。
- 这些更改适用于分支 B。
我如何将这些更改添加并提交到分支 B?
- I'm on branch A and made changes.
- The changes have not yet been added or committed.
- These changes are intended for branch B.
How do I go about adding and committing these changes to branch B?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这完全取决于您是否已经提交了更改。由于您尚未提交更改,因此
git checkout
应该可以解决问题。It all depends if you already committed the changes. Since you didn't commit the changes yet a
git checkout
should do the trick.