[英]Git exclude certain commits and the code change and keep the other commits on top
I have a development branch which serves as a parent (base) for all feature branches.我有一个开发分支,它作为所有功能分支的父级(基础)。 And the commit log looks like below:
提交日志如下所示:
ticket9: did something
ticket8: fixed something
ticket7: some action (squashed and rebased commits)
ticket7: some action (squashed and rebased commits)
ticket7: some action (squashed and rebased commits)
ticket6: implemented something
Is there a way where I can take out the commits and the resulting code of ticket7 from the development branch and link ticket 6 and ticket 8 like below?有没有办法可以从开发分支和链接票证 6 和票证 8 中取出提交和票证 7 的结果代码,如下所示?
ticket9: did something
ticket8: fixed something
ticket6: implemented something
If you can, consider doing a:如果可以,请考虑执行以下操作:
That will involve you force pushing ( git push --force
) the rewritten branch though, meaning you need to warn your colleagues working on that same branch.这将涉及您强制推送(
git push --force
)重写的分支,这意味着您需要警告在同一分支上工作的同事。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.