From f60cd9d8352d0a7e28deb8a742fa1200f4dd62ec Mon Sep 17 00:00:00 2001 From: Filipp Pirozhkov Date: Fri, 10 Nov 2017 19:20:46 +0300 Subject: [PATCH] Change command to avoid editing commit message --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b43b7f9..06d07bd 100644 --- a/README.md +++ b/README.md @@ -133,10 +133,11 @@ In order to remove a file from a commit, do the following: ```sh $ git checkout HEAD^ myfile $ git add myfile -$ git commit --amend +$ git commit --amend --no-edit ``` This is particularly useful when you have an open patch and you have committed an unnecessary file, and need to force push to update the patch on a remote. +`--no-edit` option is used to keep the existing commit message. ### I want to delete or remove my last commit