在 git 中合并后将所有提交合并到一个提交中
正如您在上图中看到的,有一个分支 'fnf1' 的 sha - '40b1...' 在此提交中,在文件“A”中进行了一些代码更改。 该分支已经与主分支合并。现在,我想在代码文件“A”中进行一些新的更改。
我的主要目标是在一次提交中保留代码文件“A”中所做的所有更改。 但是,当我进行新的更改并在 main 上重新建立基础时,新提交仅包含当前更改,但不包含“40b1...”提交中所做的更改。
我应该做什么才能获得提交“40b1...”的更改以及我想要在单个提交中进行的新更改?
As you can see in the image above, there is a branch 'fnf1' with sha - '40b1...'
In this commit some code changes were made in file 'A'.
This branch has already been merged with main branch. Now, I want to make some new changes in the code file 'A'.
My main goal is to keep all the changes made in code file 'A' in a single commit.
However, when I make new changes and rebase on the main, the new commit only contains the current change but not the changes made in '40b1...' commit.
What shall I do to get the changes of commit '40b1...' and and new change that I want to make into a single commit?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论