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\"
相关推荐
雪芽蓝域zzs1 小时前
第三十四节:用户新增编辑弹窗增加 el‑tree‑select 部门选择器
前端·javascript·vue.js
程序员老赵1 小时前
Docker 部署 go2rtc:轻松搭建摄像头多协议流媒体平台
前端·docker·直播
酷酷的逗逗乐1 小时前
前端转 Agent 开发 · 第三节:LangChain 提示词模板
前端
Cache技术分享1 小时前
516. Java 方法句柄 - 转换(进阶篇·下)
前端·后端
妙码生花1 小时前
全网 8k star 的 BuildAdmin 正式发布 Golang 版本,这次我们在CRUD赛道杀死了比赛。
前端·后端·ai编程
写代码像蔡徐抻1 小时前
三年了,AI为何还没有抢走程序员饭碗?
前端·后端·面试
梦曦i2 小时前
unix-router v0.1.0 首发:uni-app x 的 vue-router 风格路由库
前端·uni-app
Linsk2 小时前
妙用:focus解决0到auto高度过渡的边界场景
前端·css
零域码客2 小时前
一文掌握 jQuery + Flask 全栈核心知识点(前端交互 + 后端接口 + 前后端联调)
前端·python·ajax·flask·jquery·前后端联调·web全栈