mac安装SnailGitLite并配置Beyond Compare

Beyond compare for mac pojie版下载地址

https://download.csdn.net/download/mashang123456789/93398942

https://cz.197942.com/cr7/beyondcompare4.4.2.dmg

bash 复制代码
[core]
    excludesFile = ~/.gitignore
[user]
    name = 海龙队长
    email = 
[pull]
    rebase = false
[diff]
    tool = bcomp
[difftool "bcomp"]
    cmd = open -W -a \"Beyond Compare\" -- \"$LOCAL\" \"$REMOTE\"

配置过程中各种错误汇总

ssh-keygen -t rsa

cat ~/.ssh/id_rsa.pub

配置SSH 公钥 https://gitee.com/profile/sshkeys 配置成功后,即可下载。

git clone git@gitee.com:

SnailGitLite软件在Git Setting设置->Paths路径按软件建议添加三个路径,这样merge代码才不会报错。

复制代码
[V0.0.0][首次提交product产品目录、learning_codes]

hlong@hlongMac dragon_patent % git diff product/Config.py
diff --git a/product/Config.py b/product/Config.py
index 183696a..108a15a 100755
--- a/product/Config.py
+++ b/product/Config.py
@@ -10,7 +10,7 @@ from PyQt5.QtWidgets import QApplication
 ############常量设置
 APP_NAME = "海龙专利阅读器"  #APP名称
 VERSION = "V0.0.0 2026年9月4日"     #APP版本号及功能说明
-DESCRIPTION = "(1)AI读专利:支持大模型DeepSeek-R1-0528-Qwen3-8B阅读专利摘要和说明书,从1背景技术、2发明内容、3创新点生成方案总结\n\n(2)支持全四种模式分屏\n\n(3)长按左键画矩形、右键可擦除当前页笔记\n\n(4)帮助中可自定义日志配置"
+DESCRIPTION = "(1)AI读专利:支持大模型DeepSeek-R1-0528-Qwen3-8B阅读专利摘要和说明书,从1背景技术、2发明内容、3创新点生成方案总结\n(2)支持全四种模式分屏\n(3)公
司简称放入Config\n(4)帮助中可自定义日志配置"
 FILES_MAX_NUM = 10 #支持最大文件数 cd /Users/hlong/Library/Application\ Support/
 TESSERACT_PATH = '/opt/local/bin/tesseract' #tesseract安装位置 也有/usr/local/bin/tesseract
bash 复制代码
git difftool product/Config.py
his message is displayed because 'diff.tool' is not configured.
See 'git difftool --tool-help' or 'git help config' for more details.
'git difftool' will now attempt to use one of the following tools:
opendiff kompare emerge vimdiff nvimdiff
Viewing (1/1): 'product/Config.py'
Launch 'opendiff' [Y/n]? Y
xcode-select: error: tool 'opendiff' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
没有配置~/.gitconfig 如下配置即可
hlong@hlongMac dragon_patent % cat ~/.gitconfig 
[core]
    excludesFile = ~/.gitignore
[user]
    name = 海龙队长
    email = 
[pull]
    rebase = false
[diff]
    tool = bcomp
[difftool "bcomp"]
    cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\"
    trustExitCode = true
bash 复制代码
/Applications/Beyond\ Compare.app/Contents/MacOS/bcomp

2026-09-06 07:10:47.644 bcomp[3033:33949] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa03, name = 'com.ScooterSofware.BComp.3033'
See /usr/include/servers/bootstrap_defs.h for the error codes.
An unhandled exception occurred at $00007FF81E75500A:
EAccessViolation: Access violation
$00007FF81E75500A
$0000000106479B41

fatal: external diff died, stopping at product/Config.py
问题解决。将snailgitlite的.gitconfig和~/.gitconfig均如下配置,则bcmop界面可以正常打开。但是product/Config.py差异并没有显示。
[core]
    excludesFile = ~/.gitignore
[user]
    name = 海龙队长
    email = 865909475@qq.com
[pull]
    rebase = false
[diff]
    tool = bcomp
[difftool "bcomp"]
    cmd = open -W -a \"Beyond Compare\" --args \"$LOCAL\" \"$REMOTE\"
    trustExitCode = true
[difftool "gitdiff"]
	cmd = \"/Applications/SnailGitLite.app/Contents/Resources/gitdiff.sh\" \"$LOCAL\" \"$REMOTE\"
	trustExitCode = true
复制代码
仅将cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\" 
[core]
    excludesFile = ~/.gitignore
[user]
    name = 海龙队长
    email = 865909475@qq.com
[pull]
    rebase = false
[diff]
    tool = bcomp
[difftool "bcomp"]
    cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\"
    trustExitCode = true
[difftool "gitdiff"]
    cmd = \"/Applications/SnailGitLite.app/Contents/Resources/gitdiff.sh\" \"$LOCAL\" \"$REMOTE\"
    trustExitCode = true
则命令git difftool product/Config.py可以正常看到文件差异,但是snailgitlite界面查看差异报错                       
bcomp[6338:53025] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xf03, name = 'com.ScooterSofware.BComp.6338'
See /usr/include/servers/bootstrap_defs.h for the error codes.
An unhandled exception occurred at $00007FF809C3F00A:
EAccessViolation: Access violation
$00007FF809C3F00A
$0000000103AF5B41

fatal: external diff died, stopping at product/Config.py

hlong@hlongMac Resources % cat ~/.gitconfig
[core]
    excludesFile = ~/.gitignore
[user]
    name = 海龙队长
    email = 865909475@qq.com
[pull]
    rebase = false
[diff]
    tool = gitdiff
[difftool "gitdiff"]
    cmd = \"/Applications/SnailGitLite.app/Contents/Resources/gitdiff.sh\" \"$LOCAL\" \"$REMOTE\"
    trustExitCode = true
hlong@hlongMac Resources % pwd             
/Applications/SnailGitLite.app/Contents/Resources
hlong@hlongMac Resources % cat diff.sh 
#!/usr/bin/env bash
# compare 2 files

if [ ! -f "$1" ]; then
  exit -1
fi

if [ ! -f "$2" ]; then
  exit -1
fi

LEFT="$1"
RIGHT="$2"

if [ -n "$DIFF_TOOL" ]; then
  if [ -n "$NO_SANDBOX" ]; then
    diff_cmd_path="$GROUP_CONTAINER_PATH/diff-cmd.sh"
    echo $diff_cmd_path
    echo -e "#/bin/bash\n\"$DIFF_TOOL\" \"$LEFT\" \"$RIGHT\"" > "$diff_cmd_path"
    scriptDir=$(dirname "$0")
    open -n -W -a "$scriptDir/../Applications/DiffTool.app"
  else
    "$DIFF_TOOL" "$LEFT" "$RIGHT"
  fi
else
    echo "No diff tool configured."
    exit -1
fi


# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.
exit $?
hlong@hlongMac Resources % 
将gitdiff.sh改为如下,只是能分别打开两个文件
#!/usr/bin/env bash
#/usr/local/bin/bcomp "$1" "$2"
#BC分别打开两个文件
#open -W -a "Beyond Compare" -- "$1" "$2"
open -a "Beyond Compare" -- "$1" "$2"

snailgitlite的代码差异界面终于正常弹出来了,git diff product/Config.py 命令也正常。

但git difftool product/Config.py 命令是独立弹出两个文件界面,没有对比。

复制代码
hlong@hlongMac dragon_patent % cat ~/.gitconfig
[core]
    excludesFile = ~/.gitignore
[user]
    name = 海龙队长
    email = 865909475@qq.com
[pull]
    rebase = false
[diff]
    tool = bcomp
[difftool "bcomp"]
    cmd = open -W -a \"Beyond Compare\" -- \"$LOCAL\" \"$REMOTE\"
    trustExitCode = true
#[difftool "gitdiff"]
#	cmd = \"/Applications/SnailGitLite.app/Contents/Resources/gitdiff.sh\" \"$LOCAL\" \"$REMOTE\"
#	trustExitCode = true

可行

复制代码
hlong@hlongMac dragon_patent % cat ~/.gitconfig
[core]
    excludesFile = ~/.gitignore
[user]
    name = 海龙队长
    email = 865909475@qq.com
[pull]
    rebase = false
[diff]
    tool = bcomp
[difftool "bcomp"]
    cmd = open -W -a \"Beyond Compare\" -- \"$LOCAL\" \"$REMOTE\"
相关推荐
lpfasd1239 小时前
node-sass 停止维护!老项目迁移 Dart Sass 完整教程
前端·rust·sass
Data analyse45611 小时前
rnweb 回放数据量太大怎么办?分片存储与断点续传的实现思路
前端·网络·算法·数据分析
xiaogai_gai11 小时前
金蝶收料通知单查询策略实战教程:从源系统拉取到中间层落地的完整路径
java·前端·数据库
环境栈笔记12 小时前
指纹浏览器 WebRTC 怎么设置?从 ICE 候选、代理出口到功能验证
前端·人工智能·后端·自动化
赵大仁12 小时前
官网性能优化实战:LCP 3.2s → 2.1s、CLS 0.107 → 0,以及被我推翻的 6 个判断
前端·性能优化·cls·lcp·core web vitals
xiancai_xianyu12 小时前
Text2SQL落地生产库前,SQL要过哪三道闸
前端·数据库·sql·sql注入·text2sql·ai agent开发·企业级ai框架
小羊没烦恼!13 小时前
T-SQL查询进阶--理解SQL SERVER中的分区表
服务器·开发语言·前端·javascript·html
史瓦辛格13 小时前
给 DeepSeek Harness 写费用插件:把「这次会话花了多少钱」算准
前端·deepseek
星光不问赶路人13 小时前
Vue 3 + TypeScript 中 enum 的使用实践
前端·vue.js
鸥梨菌Honevid13 小时前
UVM 中 REQ 和 RSP 类型详解:从通信模型到 item_done 与 put_response
java·前端·servlet