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\"
相关推荐
子兮曰5 天前
jev-ultrafast 深度解析:7 秒订机票的浏览器 Agent 是如何炼成的
前端·后端·agent
子兮曰5 天前
Jev 爆发一周:7 秒 Agent 背后的 System One 生态与三场争议
前端·后端·ai编程
前端小万5 天前
写公众号赚了 3000 块后,我做了一款叫 "一键成稿" 的软件
前端·微信小程序
爱勇宝5 天前
ZCode 开源 24 小时:一份没有历史的账本,回答不了"有没有偷代码"
前端·后端·chatglm (智谱)
三十而立洋5 天前
Cookie 详解:从产生到安全,一次讲透
前端·javascript
卡布鲁5 天前
把一个 Vite + Vue3 应用塞进 qiankun (React + Umi3) 主站:十个坑的复盘
前端·javascript·react.js
汉堡大王95275 天前
Jev:不是聊天机器人, 而是一个智能 if 语句
前端·人工智能·后端
梦想很大很大5 天前
从运行事实到回归证据:Workrun 的 Telemetry 与 Evaluation 实践
前端·人工智能·后端
计算机魔术师5 天前
Meta Muse agent 接入 Shopify 的 Shop Pay 实现代理式购物
前端
沙蒿同学5 天前
我用 Go 搭了一条 AI Agent 流水线:从 1 张商品图到一整套淘宝详情页
前端·javascript·后端