MCPcopy
hub / github.com/opactorai/Claudable / addOrUpdateRemote

Function addOrUpdateRemote

lib/services/git.ts:138–147  ·  view source on GitHub ↗
(repoPath: string, remoteName: string, remoteUrl: string)

Source from the content-addressed store, hash-verified

136}
137
138export function addOrUpdateRemote(repoPath: string, remoteName: string, remoteUrl: string) {
139 try {
140 const existing = runGit(['remote', 'get-url', remoteName], repoPath);
141 if (existing !== remoteUrl) {
142 runGit(['remote', 'set-url', remoteName, remoteUrl], repoPath);
143 }
144 } catch {
145 runGit(['remote', 'add', remoteName, remoteUrl], repoPath);
146 }
147}
148
149export function commitAll(repoPath: string, message: string) {
150 try {

Callers 2

connectProjectToGitHubFunction · 0.90
pushProjectToGitHubFunction · 0.90

Calls 1

runGitFunction · 0.85

Tested by

no test coverage detected