Skip to content

omarchy-reinstall-git: use existing remote instead of hardcoding#5299

Open
jondkinney wants to merge 1 commit intobasecamp:devfrom
jondkinney:fix-reinstall-git-hardcoded-url
Open

omarchy-reinstall-git: use existing remote instead of hardcoding#5299
jondkinney wants to merge 1 commit intobasecamp:devfrom
jondkinney:fix-reinstall-git-hardcoded-url

Conversation

@jondkinney
Copy link
Copy Markdown
Contributor

Problem

omarchy-reinstall-git hardcodes the clone URL:

git clone --depth=1 "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new

This means anyone running omarchy-reinstall on a fork (port for a different
arch, personal customizations, company-internal mirror, etc.) silently loses
their fork's customizations and ends up with upstream — without any warning.
It also implicitly clones the remote's default branch, so users on a non-default
branch lose that too.

Fix

Read the clone URL from the existing $OMARCHY_PATH checkout's origin remote,
and the target branch from the current HEAD. Forks reinstall from themselves;
upstream users continue to reinstall from upstream (same behavior they get today).

Also converts SSH origin URLs to HTTPS for the clone step — reinstall is often a
recovery action and shouldn't depend on having an SSH agent/key configured.
Falls back to the upstream URL + master only if the existing install has no
usable git metadata.

Testing

Verified on both an upstream basecamp/omarchy checkout and a fork
(jondkinney/armarchy, branch amarchy-3-x). Each now reinstalls from its
own origin and branch.

The script hardcoded the basecamp/omarchy URL and implicitly cloned
the default branch, which meant anyone running the reinstall command
on a fork (armarchy for ARM, or any personal fork) silently lost
their fork's customizations and branch on reinstall.

Now the script reads the origin URL and current branch from the
existing $OMARCHY_PATH checkout, so forks reinstall from themselves.
Converts SSH URLs to HTTPS to avoid needing SSH keys during what is
often a recovery scenario. Falls back to the upstream URL/master only
if the existing install has no usable git metadata.
Copilot AI review requested due to automatic review settings April 14, 2026 04:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants