Skip to content

ByteSizedMarius/gh-desktop-patches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-desktop-patches

This repository contains multiple different patches for github desktop, including the ability to pin repositories at the top of the repo list.

Context: desktop/desktop#8183, desktop/desktop#3410

Please check Notes for the tradeoffs made by using this method.

Pinning Action

Quick Start

Requires Node.js, Git, and Yarn installed

node apply.js

Flags

The script will:

  1. Check prerequisites
  2. Clone/setup the GitHub Desktop repository
  3. Let you select which features to enable
  4. Applies patches
  5. Guide you through the build process
Flag Description
--test Test all patch combinations
--debug Run in dev mode (yarn start) instead of building

Features

The following patches are available. They can be freely applied in any combination. All patches are experimental; those marked (experimental) even more.

Patch Description
pins Pin repositories to the top of the list
archive Archive repositories to a section at the bottom of the list
remove-recent Remove the "Recent" repositories section
disable-auto-updates Disable automatic updates, as updating would remove the patches
fix-auth-handler Fix the authentication handler, as when building for prod without the GitHub Desktop app tokens (which are not public), the wrong OAuth callback is registered, making logging in more difficult
separate-instance Run alongside official GitHub Desktop or run multiple patched versions simultaneously with multiple accounts. Create one version without and one with this patch and install them both. See Multiple Accounts
worktree (experimental) Detect when a branch is checked out in another worktree and offer to add that worktree to GitHub Desktop
submodule-open Double-click or right-click a submodule in changes list to open it in GitHub Desktop
untrack Add Untrack and ignore option to file right-click-menu
addlocal-protocol Add x-github-client://addlocal/ URL protocol to open local repos
hide-open-in-editor Add setting to hide "Open in editor" from repository context menu
agent-integration Add AI agent integration (Claude Code, Codex, or custom) with context menu

To get pins to work, at least pins and fix-auth-handler are required. Without disable-auto-updates, the patched version will be overwritten on the next automatic update.

Screenshots

Options Repository Context Menu File Context Menu

Notes

  • These patches are for GitHub Desktop 3.5.2 (release-3.5.2)
  • The resulting installer and executable will be unsigned
  • Uses the Developer OAuth app for authentication. For enterprise installations or auth issues, install official GitHub Desktop first, authenticate, then run the patched installer to "update". See also official docs.
  • If separate-instance is applied, a separate instance is installed, allowing multiple accounts on one machine

Multiple Accounts

If you use two accounts, both will overwrite your global git config with whichever you install later. To fix this, keep the second account's repos in a dedicated directory and use a conditional git config:

Default ~/.gitconfig:

[user]
    name = Your Name
    email = your@email.com

[includeIf "gitdir:C:/path/to/work-repos/**"]
    path = ~/.gitconfig-work

~/.gitconfig-work:

[user]
    name = Work Name
    email = work@email.com

This is just one way to solve this issue.

About

Patches for Github Desktop, including the ability to pin repositories

Topics

Resources

Stars

Watchers

Forks

Contributors