UNPKG

ice.fo.utils

Version:

8 lines (5 loc) 264 B
const { execSync } = require('child_process'); module.exports = function removeAllUnpushedCommits() { const currentBranch = exports.getCurrentBrannch(); return execSync(`git clean -fd :/ && git reset -q --hard origin/${currentBranch}`).toString().trim(); };