omarchy-reinstall-git: use existing remote instead of hardcoding#5299
Open
jondkinney wants to merge 1 commit intobasecamp:devfrom
Open
omarchy-reinstall-git: use existing remote instead of hardcoding#5299jondkinney wants to merge 1 commit intobasecamp:devfrom
jondkinney wants to merge 1 commit intobasecamp:devfrom
Conversation
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.
Contributor
There was a problem hiding this comment.
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.
Kasui92
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
omarchy-reinstall-githardcodes the clone URL:This means anyone running
omarchy-reinstallon a fork (port for a differentarch, 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_PATHcheckout'soriginremote,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 +
masteronly if the existing install has nousable git metadata.
Testing
Verified on both an upstream
basecamp/omarchycheckout and a fork(
jondkinney/armarchy, branchamarchy-3-x). Each now reinstalls from itsown origin and branch.