neo adopt
Take over a local checkout: create, push everything, become origin.
Shortcut for neo repo adopt. Creates the repo if missing, pushes refs/heads/* and refs/tags/* by URL (never forced), then makes neosource this checkout’s origin and demotes the old one to a second remote (default github). The old URL is never deleted and branches that tracked origin keep tracking it.
The adopted repo carries NO upstream-relationship record: neosource does not track it as imported from anywhere, and nothing syncs back unless you pass --mirror-back.
neo adopt [OPTIONS]| Option | Value | Required | Default | Env | Values | Description |
|---|---|---|---|---|---|---|
--to |
<TO> |
no | <owner>/<name> on neosource. Inferred when omitted: owner = your handle, name = the GitHub origin’s repo name, else the work-tree directory name |
|||
--visibility |
<VISIBILITY> |
no | private |
public, internal, private |
Visibility applied ONLY when the repo has to be created. Defaults to private — adopt takes over an existing checkout, so the safe default is not to publish it | |
--old-remote |
<OLD_REMOTE> |
no | github |
Name the current origin is renamed to. Refuses if a remote by that name already exists with a different URL — the old URL is never lost |
||
--mirror-back |
no | Also register a push mirror from neosource back to the GitHub repo origin pointed at, so the old home keeps receiving updates. The mirror pushes through the neosource GitHub App when it is installed on that repository with Contents and Workflows write; otherwise a linked classic GitHub login with the admin:public_key scope registers a deploy key. When neither is available the command prints what to fix (install the App, accept its permissions, or add a generic mirror) and still succeeds |
||||
--dry-run |
no | Print the plan and exit, changing nothing. One read-only existence probe against the server is all it sends: nothing is created, pushed or rewritten | ||||
--yes |
no | Accept a non-public target host (localhost, a private IP, .internal) without naming it via --host. Debug builds default to the local dev stack and NEOSOURCE_API is set in every dev worktree, so adopt refuses to repoint origin there unless you say so |
||||
--force |
no | Proceed past the safety refusals: an origin already on this forge but pointing at a different repo, and a target repo that shares no history with this checkout |