From 0463617683e905e4f931db68c5c5c80967ed9845 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Sat, 30 May 2015 11:13:56 -0400 Subject: [PATCH] Added git command to undo commit but leave files and index. --- commands/misc.ipynb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/misc.ipynb b/commands/misc.ipynb index 0fce712..f084d85 100644 --- a/commands/misc.ipynb +++ b/commands/misc.ipynb @@ -210,6 +210,9 @@ "# Undo a file that has not been added\n", "!git checkout — [target]\n", "\n", + "# Undo commit but leave files and index\n", + "git reset --soft HEAD~1\n", + "\n", "# Create a branch\n", "!git branch [branch]\n", "\n",