【问题标题】:Alias to open git conflicts in textmate在 textmate 中打开 git 冲突的别名
【发布时间】:2012-06-24 02:59:29
【问题描述】:

我将如何创建一个 bash 别名,将来自 git merge 或 git rebase 的任何冲突文件通过管道传输到 TextMate 的 mate 命令中?

【问题讨论】:

  • 换句话说,你想使用 TextMate 作为你的git mergetool
  • 我对此进行了调查,但找不到将 mate 设置为 mergetool 编辑器的方法。

标签: git bash textmate alias


【解决方案1】:

你可以试试

textmate `git status | grep both | awk '{print $4}'`

textmate 是您运行 TextMate 的命令。

【讨论】:

  • 就是这样!只需将命令更改为mate,这是从命令行启动 TextMate 的默认方式。否则效果很好。谢谢!
  • 您可以使用mate `git status | grep 'both modified:' | awk '{print $4}'` 使其更加健壮。这将防止像*both*.x 这样的文件意外插入。
  • 酷。后跟git add `git status | grep 'both modified:' | awk '{print $4}'`
猜你喜欢
  • 2017-04-28
  • 2022-01-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-10-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多