condition for setting upstream

This commit is contained in:
Brenden Harrell committed 2021-10-10 22:07:25 -05:00
1 parent f00d0fe567
commit 2aedf8d408
1 file changed
+7 -2
+7 -2
View File
@@ -892,8 +892,13 @@ exports.newHttpInterface = function newHttpInterface() {
const git = simpleGit(options)
try {
await git.checkout(currentBranch)
let setUpstream = ['remote', 'add', 'upstream', 'https://github.com/Superalgos/Superalgos']
await git.raw(setUpstream);
let remotes = await git.getRemotes();
if (true){
console.log(remotes)
let setUpstream = ['remote', 'add', 'upstream', 'https://github.com/Superalgos/Superalgos']
//await git.getRemotes(setUpstream);
}
let pullMainRepo = ['pull', 'upstream', `${currentBranch}`]
await git.raw(pullMainRepo);
let updateToMainRepo = ['reset', '--hard', `upstream/${currentBranch}`]