emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Amending commits


From: Gregory Heytings
Subject: Re: Amending commits
Date: Sun, 25 Sep 2022 20:15:10 +0000


As someone who does not really understand Git, does this mean we are rewriting the log message without also committing a change? I thought that was not allowed by Git.

git commit --amend is mainly used to change a commit before pushing it. Rewriting history (i.e. changing an already public commit) is (by default) not possible.

When people say that in Git you cannot rewrite history, what it means is that you can't change anything about a given *commit id* (aka "revision").


Hmm... no, AFAIU, it means that (by default) you cannot replace the commit history of a public repository with commits which do not have the HEAD of the public repository as their parent. E.g. if your public repository is

A - B - C - D
            ^ HEAD

you cannot change it into

    B - C - D
  /
A - E - F - G
            ^ HEAD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]