2017-02-24 43 views
0

我有一個由Stephan Ritcher更改的舊版本repo(renderdoc)(v 0.27)。然而它有很多bug,原來的作者Baldurk已經在最新版本中修正了0.33。問題是,如何從v 0.27獲取修補程序或更改並將其添加到v 0.33,或者如何更容易地從v 0.33獲取bug修復並將其添加到Stephan的分支?將從舊分支添加的代碼行添加到最新版本

[email protected] MINGW64 /d/experiment/renderdoc ((c67e3e7b...)) 
$ git log 
commit c67e3e7b7a221780ff904c516e9861826939e511 
Author: Stephan Richter <[email protected]> 
Date: Sun Nov 27 17:47:15 2016 -0800 

    updated submodule repository 

commit 7fff78c1a341e15e143a6007837414265cf124ee 
Author: Stephan Richter <[email protected]> 
Date: Thu Nov 24 11:30:38 2016 +0100 

    don't close renderdoc automatically 

commit 5b60cf6507ca179bb7891adc33b7702994c7aae8 
Author: Stephan Richter <[email protected]> 
Date: Wed Sep 7 15:47:03 2016 +0200 

    Added ID rendering mode for extracting mesh, texture, and shader IDs from G-                                                buffer pass. Added option to load and execute script right after log file is loa                                                ded. Replaced tinyexr with OpenEXR for dumping textures. 

commit eb3e74db38c29c2c7d74745ff7c85383d310f389 
Author: baldurk <[email protected]> 
Date: Wed Jan 20 20:19:53 2016 +0100 
:...skipping... 
commit c67e3e7b7a221780ff904c516e9861826939e511 
Author: Stephan Richter <[email protected]> 
Date: Sun Nov 27 17:47:15 2016 -0800 

    updated submodule repository 

commit 7fff78c1a341e15e143a6007837414265cf124ee 
Author: Stephan Richter <[email protected]> 
Date: Thu Nov 24 11:30:38 2016 +0100 

    don't close renderdoc automatically 

commit 5b60cf6507ca179bb7891adc33b7702994c7aae8 
Author: Stephan Richter <[email protected]> 
Date: Wed Sep 7 15:47:03 2016 +0200 

    Added ID rendering mode for extracting mesh, texture, and shader IDs from G-                                                buffer pass. Added option to load and execute script right after log file is loa                                                ded. Replaced tinyexr with OpenEXR for dumping textures. 

commit eb3e74db38c29c2c7d74745ff7c85383d310f389 

此外,我怎樣才能以交互方式選擇所有Stephan的修補程序?

[email protected] MINGW64 /d/experiment/renderdoc ((c67e3e7b...)) 
$ git reflog 
c67e3e7b [email protected]{0}: checkout: moving from playing_for_data to c67e3e7b7a221780ff904c516e9861826939e511 
c67e3e7b [email protected]{1}: clone: from https://bitbucket.org/visinf/projects-2016-playing-for-data-renderdoc 

[email protected] MINGW64 /d/experiment/renderdoc ((c67e3e7b...)) 
$ git branch 
* (HEAD detached at c67e3e7b) 
    playing_for_data 

[email protected] MINGW64 /d/experiment/renderdoc ((c67e3e7b...)) 
$ git status 
HEAD detached at c67e3e7b 
Changes not staged for commit: 
    (use "git add <file>..." to update what will be committed) 
    (use "git checkout -- <file>..." to discard changes in working directory) 

     modified: pdblocate/pdblocate.vcxproj 
     modified: renderdoc/3rdparty/breakpad/client/windows/common.vcxproj 
     modified: renderdoc/3rdparty/breakpad/client/windows/crash_generation/crash_generation_client.vcxproj 
     modified: renderdoc/3rdparty/breakpad/client/windows/crash_generation/crash_generation_server.vcxproj 
     modified: renderdoc/3rdparty/breakpad/client/windows/handler/exception_handler.vcxproj 
     modified: renderdoc/driver/d3d11/renderdoc_d3d11.vcxproj 
     modified: renderdoc/driver/dxgi/renderdoc_dxgi.vcxproj 
     modified: renderdoc/driver/gl/renderdoc_gl.vcxproj 
     modified: renderdoc/driver/shaders/dxbc/renderdoc_dxbc.vcxproj 
     modified: renderdoc/driver/shaders/spirv/renderdoc_spirv.vcxproj 
     modified: renderdoc/renderdoc.vcxproj 
     modified: renderdoccmd/renderdoccmd.vcxproj 
     modified: renderdocshim/renderdocshim.vcxproj 
     modified: renderdocui/ironpython/compilelibs.sh 

Untracked files: 
    (use "git add <file>..." to include in what will be committed) 

     renderdoc.VC.VC.opendb 
     renderdoc.VC.db 
     renderdocui/ironpython/pythonlibs.zip 

no changes added to commit (use "git add" and/or "git commit -a") 

也:

[email protected] MINGW64 /d/latest_renderdoc/renderdoc (master) 
$ git status 
On branch master 
Your branch is up-to-date with 'origin/master'. 
nothing to commit, working tree clean 

,並從一些最新版本的git的日誌東西:

$ git log 
commit 1ba4a8ad1efbc1ee6ac13649a59adb8420910a3e 
Author: baldurk <[email protected]> 
Date: Thu Feb 23 23:53:24 2017 +0000 

    Reapply fix 16f85cadc which was wrongly removed by 5a1ded738 

commit a029fc4ab1d6f24aba969d28b81d66f01931766f 
Author: Baldur Karlsson <[email protected]> 
Date: Thu Feb 23 17:46:42 2017 +0000 

    Update screenshots to point to renderdoc.org site 

commit 73ba1c140a4e02b147f4398cc3cd1fed6ecaa738 
Author: Janos Pantos <[email protected]> 
Date: Thu Feb 23 18:21:34 2017 +0100 

    Fix eglCreateWindowSurface function name at dlsym call. 

commit 898e95496531b8cc10f8ddb513d362d15e3e0e68 
Author: baldurk <[email protected]> 
Date: Thu Feb 23 17:38:09 2017 +0000 

    Bump version info to v0.34 
:...skipping... 
commit 1ba4a8ad1efbc1ee6ac13649a59adb8420910a3e 
Author: baldurk <[email protected]> 
Date: Thu Feb 23 23:53:24 2017 +0000 

    Reapply fix 16f85cadc which was wrongly removed by 5a1ded738 

commit a029fc4ab1d6f24aba969d28b81d66f01931766f 
Author: Baldur Karlsson <[email protected]> 
Date: Thu Feb 23 17:46:42 2017 +0000 

    Update screenshots to point to renderdoc.org site 
+1

你可以在這裏使用merge或rebase嗎?另外,Stephan Ritcher和Baldurk知道你在這裏發表了他們的名字嗎? –

回答

0

對於舊版本v0.27中的/d/experiment/renderdoc,您可以將其添加爲v0.33中的遠程/d/latest_renderdoc/renderdoc。然後,您可以將更改從v0.27更改爲v0.33。如下具體步驟:

git remote add old /d/experiment/renderdoc 
git fetch old 
git rebase --onto master <commit id on v0.27 before start to rebase) <commit if on v0.27 of the end to rebase> 
git checkout -b temp 
git checkout master 
git merge temp 

比如,如果你想在提交變基從7fff78c1a341e15e143a6007837414265cf124eec67e3e7b7a221780ff904c516e9861826939e511到v0.33主分支,你應該使用git rebase --onto master 5b60cf6 c67e3e7

由於提交給主版本的提交併不存在於您的源中,並且在您將這些提交重新署定爲主版本之後,這些都不是分支點。所以你需要在完成rebase之後創建一個分支來指向提交,然後快速轉發master分支來指向它(作爲上面的最後3個命令)。

+0

請看看,我得到了這個錯誤http://pastebin.com/TtLhkbrh –

+0

我更新了更多的命令,並在我的答案中的原因,請再次測試。順便說一句,在修改和保存rebase期間的衝突文件後,你應該使用'git add filename'然後'git rebase --continue'。 –