feat: new button to push local branches, no longer auto pushes new branches to remote

This commit is contained in:
Sam Chau
2024-09-07 15:18:12 +09:30
parent 20ff5c822b
commit 3cc21c6951
4 changed files with 129 additions and 52 deletions

View File

@@ -297,3 +297,12 @@ export const unlinkRepo = async (removeFiles = false) => {
}
};
export const pushBranchToRemote = async (branchName) => {
try {
const response = await axios.post(`${API_BASE_URL}/git/branch/push`, { branch: branchName });
return response.data;
} catch (error) {
console.error('Error pushing branch to remote:', error);
throw error;
}
};