docs/private-repo-fast.md
Use this when you already have code locally and want a private GitHub repo quickly.
This guide covers two different cases:
origin/upstream, and you want an extra private share remote like <repo>-iThe important distinction:
f publish works from the current directory and is not tied to ~/reposf repos clone is the command that cares about ~/reposSo yes, this works from places like:
~/repos/viperrcrypto/Siftly~/code/flow-extensionUse this when:
originorigin/upstream setupFrom the repo root:
f publish -y --private
This is the fastest default.
What it does:
gh authExample from outside ~/repos:
cd ~/code/flow-extension
f publish -y --private
That is the recommended path for repos like ~/code/flow-extension.
Use this when:
origin or upstreamThis is the right pattern for repos like:
~/repos/viperrcrypto/Siftly
git status --short --branch
git add <intended files>
git commit -m "<message>"
origin/main if needed.git fetch origin main
git rev-parse HEAD origin/main
If you need to move your work on top of origin/main, do that intentionally before publishing.
gh repo create nikivdev/<repo>-i --private --disable-wiki --source=. --remote=private
git push -u private HEAD:main
Example:
cd ~/repos/viperrcrypto/Siftly
gh repo create nikivdev/Siftly-i --private --disable-wiki --source=. --remote=private
git push -u private HEAD:main
This leaves:
origin aloneupstream aloneprivate as the new share/mirror remotef publish vs gh repo createUse f publish when:
Use gh repo create ... --remote=private when:
originIf a repo already has origin and you are not completely sure what to do, use this:
git remote -v
git fetch origin main
gh repo create nikivdev/<repo>-i --private --disable-wiki --source=. --remote=private
git push -u private HEAD:main
That is the safest default for “share this work privately with another dev”.
If you want future f sync --push calls to go to the private repo instead of origin, add this to the repo’s flow.toml:
[git]
remote = "private"
Only do this if the repo is now private-first for your workflow.
If you just want a one-off share snapshot, skip this.
~/code/flow-extensioncd ~/code/flow-extension
f publish -y --private
~/repos/viperrcrypto/Siftlycd ~/repos/viperrcrypto/Siftly
git fetch origin main
gh repo create nikivdev/Siftly-i --private --disable-wiki --source=. --remote=private
git push -u private HEAD:main
gh is not authenticatedRun:
gh auth login
gh auth status
If the private repo already exists, skip creation and just wire or verify the remote:
git remote add private [email protected]:nikivdev/<repo>-i.git
git push -u private HEAD:main
If private already exists:
git remote -v
git push -u private HEAD:main
~/reposThat is fine.
f publish operates on the current folder, not on ~/repos.
Good. Commit first.
For existing repos with real history, do not rely on auto-magic here. Make the commit you want to share, then push that exact commit.