Skip to content

Commit

Permalink
Add 'git reset HEAD~' stage
Browse files Browse the repository at this point in the history
  • Loading branch information
draperunner committed May 8, 2019
1 parent 3d152d2 commit 0de57fc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions git-pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function main() {
console.log()
console.log("1: I forgot to add a file")
console.log("2: A better message")
console.log("3: Just throw the last commit away")
console.log("3: Remove the last commit, but keep the changes")
console.log("4: Throw the last commit away, and delete its changes")
response = prompt("> ")
console.log()

Expand All @@ -100,10 +101,18 @@ function main() {
if (response == "3") {
console.log("Looks like this is what you are looking for:")
console.log()
console.log("git reset --hard HEAD^")
console.log("git reset HEAD~")
console.log()
return "2213"
}

if (response == "4") {
console.log("Looks like this is what you are looking for:")
console.log()
console.log("git reset --hard HEAD^")
console.log()
return "2214"
}
}

if (response == "2") {
Expand Down

0 comments on commit 0de57fc

Please sign in to comment.