Publish a local repository
After local repository add, create, or onboarding import, OCP can run a shared optional post-creation flow.
What the flow offers
- optional Git initialization with an initial commit
- optional GitHub publish using
gh repo create - persistence of the discovered
originURI into the configured repository entry while preserving the explicitlocalPath
For the exact publish conditions and defaults, see Repository commands and Configuration and paths.
Defaults
- Git init default:
yesfor interactive create and onboarding,nofor adding an existing local repository - GitHub publish default:
no - visibility default when publishing:
private
Conditions
The GitHub publish prompt only appears when:
gh auth statussucceeds- the repository does not already have an
originremote
If a file-based repository already has a configured origin, OCP persists that URI immediately instead of asking to publish again.
Failures in this optional post-creation flow do not roll back an otherwise successful add, create, or onboarding operation.