add clean git branch commands

This commit is contained in:
Brenden Harrell committed 2021-10-08 08:50:06 -05:00
1 parent 4033f4019f
commit 87b05e5ecd
1 file changed
+4
+4
View File
@@ -892,6 +892,10 @@ exports.newHttpInterface = function newHttpInterface() {
const git = simpleGit(options)
try {
await git.checkout(currentBranch)
let postCheckoutCommands = ['git remote add upstream https://github.com/Superalgos/Superalgos', `git pull upstream ${currentBranch}`]
let result = await git.raw(postCheckoutCommands);
console.log(result)
} catch (err) {
console.log('[ERROR] Error changing current branch to ' + currentBranch)
console.log(err.stack)