From 0b561585ae34a6b178fa7a647a114ef0d5b52df4 Mon Sep 17 00:00:00 2001 From: Mats Byrkjeland Date: Thu, 30 Jan 2020 22:41:00 +0100 Subject: [PATCH] Add branch for resetting local branch to remote --- git-pretty.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/git-pretty.js b/git-pretty.js index 0acae1f..ea53dce 100755 --- a/git-pretty.js +++ b/git-pretty.js @@ -45,6 +45,7 @@ async function main() { 'My Git history is ugly', 'I have a bunch of old branches I want gone', 'I want to sync my fork with the original repo', + 'I want my branch to be exactly like on GitHub!', ]) if (answer === '1') { @@ -268,6 +269,15 @@ async function main() { return '53' } } + + if (answer === '6') { + console.log('Here is what you need. if master is not your desired branch, replace it in the code below with the desired branch name.') + console.log('Make sure you don\t have any local changes you want to keep!') + dangerZone() + printCode('git fetch') + printCode('git reset --hard origin/master') + return '6' + } } main()