The Pragmatic Git
  • Home
  • About
  • Author
  • Member Zone
Sign in Subscribe

amend

A collection of 1 post
Does amending a commit change its hash?
Git

Does amending a commit change its hash?

As all commits are immutable snapshots, any alterations to their content would change the hash. In more strict terms, amending a commit creates a new commit with the desired changes, leaving the original commit untouched. In this post I'll showcase a typical use-case illustrating this.
10 Sep 2021 4 min read
Page 1 of 1
The Pragmatic Git © 2025
  • Data & privacy
  • Contact
Powered by Ghost