VSCode 插件 GitLens 破解方法

文章目录

    • [1. 安装指定版本](#1. 安装指定版本)
    • [2. 修改插件文件](#2. 修改插件文件)
    • [3. 重启 VSCode](#3. 重启 VSCode)

1. 安装指定版本

VSCode 中打开扩展(Ctrl + Shift + X),搜索 GitLens,右键点击 安装特定版本,在弹出的窗口中选择 17.0.2,然后等待安装完成。

2. 修改插件文件

  1. 找到并进入 VSCode 扩展安装目录:

    • Ubuntu:~/.vscode/extensions
    • Windows:C:\Users\用户名\AppData\Roaming\Code\User\extensions
    • Mac:~/.vscode/extensions
  2. 找到 GitLens 插件文件夹,修改 eamodio.gitlens-17.0.2/dist/webviews/graph.js 文件

    Ubuntu 为例,修改的文件路径为:~/.vscode/extensions/eamodio.gitlens-17.0.2/dist/webviews/graph.js

  3. 搜索以下内容:

    js 复制代码
    ,W().createElement(ld,{className:"graph-app__gate",featurePreview:eZ,featurePreviewCommandLink:eZ?iT("gitlens.plus.continueFeaturePreview",r.webviewId,r.webviewInstanceId,{feature:eZ.feature}):void 0,appearance:"alert",featureWithArticleIfNeeded:"the Commit Graph",source:{source:"graph",detail:"gate"},state:eU?.state,webroot:r.webroot,visible:!eW},W().createElement("p",{slot:"feature"},W().createElement("a",{href:"https://help.gitkraken.com/gitlens/gitlens-features/#commit-graph-pro"},"Commit Graph"),W().createElement(lr,{source:{source:"graph",detail:"badge"},subscription:eU})," ","--- easily visualize your repository and keep track of all work in progress. Use the rich commit search to find a specific commit, message, author, a changed file or files, or even a specific code change."))
  4. 找到后,直接删除,然后保存文件即可。

3. 重启 VSCode

  • 重启 VSCode,即可看到 GitLens 插件已经破解成功。
  • 如果重启后,发现 GitLens 插件仍然显示为需要付费状态,可以尝试重新安装这个版本(17.0.2)的插件,或者重新修改插件文件。
  • 破解成功后,记得关闭插件自动更新功能,否则插件会自动更新,破解失效。
  • 如果需要关闭插件自动更新功能,可以按照以下步骤操作:
    • 关闭 GitLens 插件自动更新:
      1. 打开 VSCode,找到 扩展Ctrl + Shift + X
      2. 搜索 GitLens,点击 GitLens,取消勾选 自动更新 即可
    • 关闭所有插件自动更新:
      1. 打开 VSCode,点击左下角的齿轮图标,选择 设置
      2. 在设置中搜索 自动更新,找到 扩展 选项,将其设置为
      3. 保存设置,关闭 VSCode,重新打开即可

截至发文,亲测有效~

相关推荐
EQ-雪梨蛋花汤20 小时前
【Unity笔记】Unity 编辑器扩展:打造一个可切换 Config.assets 的顶部菜单插件
unity·编辑器·游戏引擎
李少兄1 天前
解决IntelliJ IDEA 提交代码时无复选框问题
java·ide·intellij-idea
sniper_fandc1 天前
IDEA修改系统缓存路径,防止C盘爆满
java·ide·intellij-idea
CUIYD_19891 天前
Eclipse 常用搜索功能汇总
java·ide·eclipse
byte轻骑兵2 天前
365 天技术创作手记:从一行代码到四万同行者的相遇
ide·vscode·编辑器
点云侠2 天前
解决Visual Studio 2022编译工程速度慢的问题
开发语言·c++·ide·算法·计算机视觉·visual studio
奥特曼打小白2 天前
Visual Studio Code的第一次安装
ide·vscode·编辑器
weixin_456904272 天前
Vscode中开发VUE项目的调试方案
ide·vue.js·vscode
小猫挖掘机(绝版)2 天前
通过tailscale实现一台电脑上vscode通过ssh连接另一台电脑上的VMware Linux 虚拟机
linux·windows·vscode·ubuntu·ssh
和小胖11222 天前
第二讲 Vscode+Python+anaconda 高阶环境配置
ide·vscode·python