GitHub 使用 Sourcetree 克隆

在 GitHub 的“Code”下拉菜单中添加一个“Open with Sourcetree”按钮,允许您直接将仓库克隆到 Sourcetree 应用程序中。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
cooaer
日安装量
0
总安装量
3
评分
0 0 0
版本
1.4
创建于
2025-07-10
更新于
2025-07-10
大小
6.2 KB
许可证
MIT
适用于

GitHub Clone with Sourcetree

This script adds an "Open with Sourcetree" button to the GitHub "Code" dropdown menu, allowing you to clone repositories directly into the Sourcetree application.

Screenshot of the "Open with Sourcetree" button

Features:

  • Adds a convenient button to the clone dialog.
  • Uses the official Sourcetree app icon, which adapts to GitHub's light and dark themes.
  • Automatically detects the repository's HTTPS clone URL.

Installation

  1. Make sure you have a user script manager installed, such as Tampermonkey or Greasemonkey.
  2. Navigate to the script file in this repository: github-clone-sourcetree.user.js.
  3. Click the link, and your user script manager will automatically open and prompt you to install the script.

Usage

  1. Go to any GitHub repository page.
  2. Click the green "Code" button.
  3. You will see the new "Open with Sourcetree" button in the dropdown list.
  4. Clicking it will launch the Sourcetree application and open the clone dialog for that repository.