lgh_add
Register a local Git repository with the LGH server by creating a bare repo and adding an 'lgh' remote, enabling push and backup via lgh_up.
Instructions
Register a local Git repository with the LGH local server. Creates a bare repository under the LGH repos dir and adds an "lgh" remote pointing at it to the source repo. Initializes a git repo first if the directory is not one yet; refuses with an error if the path does not exist, the name is already registered, or a bare repo already exists at the target path. Returns the repository name and its clone URL. Use lgh_up to push subsequent commits and lgh_remove to unregister.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional custom name for the repository on LGH | |
| path | Yes | Absolute path to the LOCAL working directory containing the Git repository |