edit | blame | history | raw

2026-07-05 自建远端接入

用户目标

用户希望把当前本地 TagLauncher App 最新代码接入自建 Git 服务器管理,并采用更正常的 main 主分支工作流。自建仓库地址:

https://git.boborobots.com/r/crazy-macs/tag-launcher.git

已完成事项

  • 确认自建远端仓库可访问,且初始无 heads / tags,可作为空仓库接入。
  • 新增本地 remote:selfhost
  • 将当前 App 最新代码推送为自建远端 main
  • 将当前本地 App 分支从 codex/pro-custom-hotkeys-8.2.0 改名为 main
  • 设置本地 main 跟踪 selfhost/main
  • 将旧本地 main 保留为 github-pages-main-legacy,避免覆盖或丢失旧引用。
  • 推送当前 HEAD 的发布 tag:v8.3.5-build20260702.1046
  • 保持 GitHub origin 不变,官网/GitHub Pages worktree 不受影响。

核心事实 / 变更快照

  • 本地工作区:/Users/ar/Projects/Taglauncher
  • 自建远端 remote 名称:selfhost
  • 自建远端 URL:https://git.boborobots.com/r/crazy-macs/tag-launcher.git
  • 当前本地主分支:main
  • 当前 upstream:selfhost/main
  • 当前 App 最新 commit:2309264ee94daca4b9abe3592d84602c98b77690
  • 当前发布 tag:v8.3.5-build20260702.1046
  • 自建远端 refs:
  • refs/heads/main -> 2309264ee94daca4b9abe3592d84602c98b77690
  • refs/tags/v8.3.5-build20260702.1046 -> annotated tag b492589d6adde01f4ce991cd4dab6e51e7378c23,peeled commit 2309264ee94daca4b9abe3592d84602c98b77690
  • 旧本地分支处理:原本地 main 改名为 github-pages-main-legacy,仍指向旧 commit 4a3f302 并跟踪 GitHub origin/main
  • GitHub origin:未修改;仍为 https://github.com/shanghai3168/taglauncher.git

验证结论

  • git status -sb## main...selfhost/main,工作区干净。
  • git push --dry-runEverything up-to-date
  • git rev-parse HEADgit rev-parse selfhost/main 均为 2309264ee94daca4b9abe3592d84602c98b77690
  • git ls-remote --heads --tags selfhost 返回远端 main 和当前 release tag。
  • 自建服务端 HEAD branch 仍显示 (unknown);本地已设置 selfhost/HEAD -> selfhost/main,但服务端默认分支是否显示为 main 可能需要在自建 Git 服务网页/管理界面配置。

可复用命令 / Runbook

用途:以后复核 TagLauncher 自建远端主线、upstream 和发布 tag。

前置条件:在主工作区执行:

cd /Users/ar/Projects/Taglauncher

查看 remote:

git remote -v

查看本地分支与 upstream:

git status -sb
git branch -vv

确认自建远端 main 和 tag:

git ls-remote --heads --tags selfhost

确认当前 HEAD 与 selfhost/main 一致:

git rev-parse HEAD
git rev-parse selfhost/main

普通推送 dry-run:

git push --dry-run

本轮实际接入命令快照:

git remote add selfhost https://git.boborobots.com/r/crazy-macs/tag-launcher.git
git push -u selfhost HEAD:refs/heads/main
git push selfhost v8.3.5-build20260702.1046
git branch -m main github-pages-main-legacy
git branch -m main
git remote set-head selfhost main

注意:本轮没有把用户提供的账号密码写入 Git remote URL、Git config 或项目文件;实际推送未要求写入凭据。

搜索关键词:selfhostgit.boborobots.comtag-launcher.gitcodex/pro-custom-hotkeys-8.2.0github-pages-main-legacyv8.3.5-build20260702.1046

未决问题

  • 自建服务端默认分支 HEAD branch 仍未通过 Git 广告为 main;如网页端也显示未知,需要在自建 Git 服务管理界面把默认分支设为 main
  • 本轮只推送当前 App 主线和当前 release tag;没有推送所有历史本地分支或所有历史 tags。

后续建议

  • 后续 App 代码开发以本地 main 为主线,普通 git pull / git push 将对接 selfhost/main
  • 官网/GitHub Pages 仍通过独立 worktree 和 GitHub origin/main 维护,不与 App 自建远端主线混用。