我在git仓库中有以下最近的历史记录:
自
我想移动(或回溯)
* 7661a06 (HEAD, origin/devConsolidate, devConsolidate) Fix seg fault; OCBA intermediary compares by value() now also
| * 0bbe038 (origin/master, master) Flawed work no seedShift
|/
* 62fe9db Turn on OCBA_DEBUG; nan/inf values in OCBA prior to crash
* 71298c8 Turn on OCBA (non-intermediary); seg fault occurs
* 3693904 No OpenMP, no OCBA; no memory leaks on valgrind
* 9d5686c Disable OpenMP threads
* 80bbc3b Debug (-O0) build now throws exception also
* e148013 Post convert simulation4_NEJMdisutilities [] to at()
* 66cfba9 Post convert OCBA [] to at()
* 32db3be Pre convert OCBA [] to at()
* 4a9f25b Prep for debugging
* 907e88b Found error (vector out of bounds); need to fix from here
* ca6c639 Implement elapsed, iteration, and max time in OCBA
* db68c15 Fix SEG FAULT; OCBA now working (with intermediary)
* f1c6f05 GA now uses OCBA; GA/OCBA params from config file; produces SEG FAULT
| * 3b16dcf (origin/genCRNgraph, genCRNgraph) Generate QALYs test and control independent-sampling
|/
* 001eff2 Merge branch 'OCBAdev'
自
f1c6f05
之后的所有提交(子孙节点)都是为了调试问题而进行的。事后来看,我应该创建一个单独的分支来进行这个调试,但我在master
上全做了。现在,在提交7661a06
中,我已经修复了这个bug。我想移动(或回溯)
master
分支(或指针),使它位于提交f1c6f05
处。在这样做之后,我就可以从提交7661a06
和62fe9db
之间的差异中生成补丁,并将其应用到f1c6f05
上。因此,我的Git日志的一部分应该如下所示:* 7661a06 (origin/devConsolidate, devConsolidate) Fix seg fault; OCBA intermediary compares by value() now also
| * 0bbe038 Flawed work no seedShift
|/
* 62fe9db Turn on OCBA_DEBUG; nan/inf values in OCBA prior to crash
.
.
.
* db68c15 Fix SEG FAULT; OCBA now working (with intermediary)
| * <HASH> (HEAD, origin/master, master) Fix problem and rewind master
|/
* f1c6f05 GA now uses OCBA; GA/OCBA params from config file; produces SEG FAULT
| * 3b16dcf (origin/genCRNgraph, genCRNgraph) Generate QALYs test and control independent-sampling
|/
* 001eff2 Merge branch 'OCBAdev'
我需要使用哪些命令来完成所有这些任务?具体来说,我应该如何:(1)移动主分支,(2)生成补丁,以及(3)应用补丁?
origin
只是我在私有的 GitHub 仓库中存储的一个备份。 - synaptik