From 7cd223bb4d3d3042468a46fc9abeb833bdf7169e Mon Sep 17 00:00:00 2001 From: fechin Date: Thu, 5 Jan 2023 14:01:38 +0800 Subject: [PATCH] Rewriting history --- source/_posts/git.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/_posts/git.md b/source/_posts/git.md index ddd90f9..147fd04 100644 --- a/source/_posts/git.md +++ b/source/_posts/git.md @@ -355,11 +355,12 @@ $ git checkout -- -### Commit +### Rewriting history Rewrite last commit message ```shell script -$ git commit -v --amend +$ git commit --amend -m "new message" ``` +See also: [Rewriting history](https://www.atlassian.com/git/tutorials/rewriting-history) ### Git Aliases