---
title: "Discussion on \"Git basics: Changing your last commit message\" | Hashnode"
description: "Discussion on \"Git basics: Changing your last commit message\". You might accidentally make a typo while writing your commit message.\nOr because you quickly tried to solve a bug, you accidentally left the old commit message and pushed that.\nIt's a good practice to keep the message meaningful, so you'll know what ..."
url: "https://hashnode.com/posts/git-basics-changing-your-last-commit-message/62d65c4fd3af5e3713d5eadb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Git basics: Changing your last commit message](https://h.daily-dev-tips.com/git-basics-changing-your-last-commit-message?utm_source=hashnode&utm_medium=feed)

You might accidentally make a typo while writing your commit message. Or because you quickly tried to solve a bug, you accidentally left the old commit message and pushed that. It's a good practice to keep the message meaningful, so you'll know what ...

Jul 19, 2022 · 2 min read · h.daily-dev-tips.com  
Read the article

-   [#github](https://hashnode.com/tag/github)
-   [#git](https://hashnode.com/tag/git)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Chris Bongers](https://hashnode.com/@dailydevtips)

@dailydevtips · Cape Town, SA

  
[View profile](https://hashnode.com/@dailydevtips)

Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.

## Responses 2

Markdown supported · ⌘↵ to post

[Umair Hafeez](https://hashnode.com/@umairhafeez)

[Jul 22, 2022](https://hashnode.com/posts/git-basics-changing-your-last-commit-message/62d65c4fd3af5e3713d5eadb/comment/62dad184e3b09e6748885e60)

Awesome, I never knew about `--force-with-lease` flag. I learned something new today, thanks to you!

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Jul 23, 2022](https://hashnode.com/posts/git-basics-changing-your-last-commit-message/62d65c4fd3af5e3713d5eadb/comment/62dad184e3b09e6748885e60#reply-62db87d538759e6b498294a8)

Yep!

I literally wrote this article and yesterday forgot about applying the `--force-with-lease` myself 🤦‍♂️

Super cool option to keep the history clean when it's only a commit message fix.

[Imajin](https://hashnode.com/@imajindevon)

[Jul 19, 2022](https://hashnode.com/posts/git-basics-changing-your-last-commit-message/62d65c4fd3af5e3713d5eadb/comment/62d73b043060d03288d9f523)

Great information. Thanks for sharing!

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Jul 20, 2022](https://hashnode.com/posts/git-basics-changing-your-last-commit-message/62d65c4fd3af5e3713d5eadb/comment/62d73b043060d03288d9f523#reply-62d7b909ca829b4aca565868)

Happy to hear you enjoyed it Imajin 💖
