其他分享
首页 > 其他分享> > 使用git rebase --onto一例

使用git rebase --onto一例

作者:互联网

修改某次提交的内容

比如有下面一段提交历史:

0621df5ad (qos_sched) sched: Fix sleeping in atomic context at cpu_qos_write()
f169a3e0b sched: Introduce handle priority reversion mechanism
b08fcb6bb sched: unthrottle qos cfs rq when free a task group
830d63d9d sched: Avoid sched entity null pointer panic
f5a4134a5 sched: Clear idle_stamp when unthrottle offline tasks
5f62b2bf1 sched: Fix offline task can't be killed in a timely
ca399d0c0 sched: Optimizing qos scheduler performance
e079ac6eb sched: Fix throttle offline task trigger panic
5025848e0 sched: Remove residual checkings for qos scheduler
9eef33bca sched: Change cgroup task scheduler policy
9c409a3dc sched: Unthrottle the throttled cfs rq when offline rq
0a394a4a9 sched: Enable qos scheduler config
b7b6a9871 sched: Throttle qos cfs_rq when current cpu is running online
9f71556dd sched: Introduce qos scheduler for co-location
42c06287c memcg: Add static key for memcg priority
74730fdaf memcg: fix kabi broken when enable CONFIG_MEMCG_QOS
a54bc3e94 memcg: enable CONFIG_MEMCG_QOS by default
140510d4d Add defconfig file: kernel-4.18.0-x86_64-openeuler.config
cd5b70b17 memcg: support priority for oom
ef037177f mm: memcontrol: add struct mem_cgroup_extension
1840d2057 (master) add .gitignore
0d939f247 remove some files
9cac7cdce init version

当前所在的分支是qos_sched,如果此时发现9f71556dd sched: Introduce qos scheduler for co-location的代码有些问题,但是又不想重新引入一个新的提交记录,那么
可以这么来:

此时的提交历史类似下面这种:

                           E---F---G---H---I qos_sched
                          /
                         D    9f71556dd
                        /
               A---B---C---J  tmp
                         D    9f71556dd
                        /
               A---B---C---J  tmp
                            \
                             E'---F'---G'---H'---I' qos_sched

完。

标签:git,sched,--,rebase,memcg,---,scheduler,qos,9f71556dd
来源: https://www.cnblogs.com/pengdonglin137/p/16250961.html