我在本地有一个 TortoiseGit 存储库,它也被推送到远程。有 2 个分支 - master(生产版本)和 CodeFirst(开发分支)。
今天我修复了 CodeFirst 分支中的一个小错误。我想将该更改(仅对单个文件的单个更改)合并到 master.xml 文件中。我将本地 repo 切换到 master,选择了合并,然后选择了单个提交。一旦我按下 OK,master 现在似乎包含 CodeFirst 分支中的所有更改,而不仅仅是我想要的更改。
我如何能
a) 恢复错误的合并和提交
b) 将 CodeFirst 的单个更改重新应用到 master
[This revision is tagged CodeFirst and master in the TortoiseGit log. It is the commit I wanted to merge]
Revision: 7d4c3d30aec8fb8e531331866c091dee8fa94f25
Author: Nikki Locke <nikki@trumphurst.com>
Date: 07/04/2015 18:03:37
Message:
Allow changing both accounts on new transfers.
----
Modified: bin/banking/transfer.html
[This revision is tagged origin/CodeFirst and master in the TortoiseGit log. I did not want to merge it to master!]
Revision: ce94383e46285fb4f2af4dc21f850952ca65f250
Author: Nikki Locke <nikki@trumphurst.com>
Date: 02/04/2015 19:54:23
Message:
Fixed syntax errors in CASE statements
----
Modified: Reports.cs
[Many more revisions made in the CodeFirst branch omitted]
[This revision is tagged origin/master in the TortoiseGit log]
Revision: 68e1dff312b5927df01a9ab7e483f9163324b864
Author: Nikki Locke <nikki@trumphurst.com>
Date: 31/03/2015 19:04:01
Message:
Make Qty input box smaller.
Put some css into invoice print to make it align correctly.
----
Modified: bin/customer/print.html
Modified: bin/default.js
Run Code Online (Sandbox Code Playgroud)
要“恢复”合并,请打开日志对话框并将您的分支/当前 HEAD 重置为合并前的提交(您要保留)。
实际上,您不想合并另一个分支,而是想挑选一个提交。在日志中单击要选择的提交并选择“cherry-pick”。
归档时间: |
|
查看次数: |
12921 次 |
最近记录: |