Adds a bare repository created with `createRemote` as the remote for the workspace. * * You'll probably want to just use `createRepoForRemoteWorkspace` instead, but this is provided if you are testing something it can't handle.
(wsRoot: string, remoteDir: string)
| 55 | * You'll probably want to just use `createRepoForRemoteWorkspace` instead, but this is provided if you are testing something it can't handle. |
| 56 | */ |
| 57 | static async remoteAdd(wsRoot: string, remoteDir: string) { |
| 58 | const git = new Git({ localUrl: wsRoot, remoteUrl: remoteDir }); |
| 59 | await git.remoteAdd(); |
| 60 | // Need to push to be able to set up remote tracking branch |
| 61 | await git.push({ remote: "origin", branch: await git.getCurrentBranch() }); |
| 62 | } |
| 63 | |
| 64 | /** Set up a workspace with a remote, intended to be used when testing pull or push functionality. |
| 65 | * |
no test coverage detected