ice.fo.utils
Version:
17 lines (14 loc) • 429 B
JavaScript
module.exports = function resetBranches({ branches }) {
const currentBranch = exports.getCurrentBrannch();
for (const branchName of branches) {
try {
console.log('[Reset Branch]', branchName);
exports.checkoutToBranch(branchName);
exports.removeAllUnpushedCommits();
exports.pullLatest();
} catch (error) {
console.error(error);
}
}
exports.checkoutToBranch(currentBranch);
};