在SmartGit中创建补丁并应用补丁

Rey*_*rPM 10 git patch smartgit

我有一个托管在Bitbucket的在线存储库,但其中一个开发人员有Internet连接问题,大多数时候无法连接到存储库.为了在存储库中保存相同的代码并在开发人员之间共享,我认为在创建补丁并通过电子邮件发送给他.既然他和我使用SmartGit客户端,那么可以从SmartGit创建和应用补丁吗?我阅读了文档,但没有找到任何有用的,有任何建议吗?我不知道Git Flow功能是否是解决方案

01F*_*1F0 19

这似乎得到了SmartGit 6.5版的支持.这是更改日志:https://www.syntevo.com/smartgit/changelog-6.5.x.txt(在SmartGit 6.5预览1下)

以下步骤对我来说很好.

创建补丁:

  1. 打开日志
  2. 选择一个分支并右键单击提交
  3. 选择"格式化补丁..."并保存文件

应用补丁:

  1. 打开日志
  2. 转到"工具",然后"应用补丁..."
  3. 选择补丁

修补程序将应用于当前检出的分支.

  • 如果缺少这些或任何命令,请转到首选项,工具并单击"重新添加默认值" - 我的遗失,可能来自多年来的更新. (6认同)

Lys*_*gel 6

看起来从 SmartGit 22.1 开始,格式补丁功能又消失了。值得庆幸的是,他们的网站上有它作为示例工具:https ://docs.syntevo.com/SmartGit/22.1/Example-Tools.html#format-patch

将此内容保存到文件中format-patch.yml,并使用首选项“工具”页面上的“导入”按钮从 SmartGit 版本 < 22.1 恢复格式补丁功能。

tools:
- name: Format Patch
  fileStarter: {command: '${git}', parameters: 'format-patch -o "${dirSelect}" -1 ${commit}'}
  useForOpen: false
  waitUntilFinished: true
  filePattern: '*'
- name: Format Patch
  fileStarter: {command: '${git}', parameters: 'format-patch -o "${dirSelect}" ${commit}..${commit2}'}
  useForOpen: false
  waitUntilFinished: true
  filePattern: '*'
Run Code Online (Sandbox Code Playgroud)