Re: changing log entries

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

 



Jon Masters <jcm@xxxxxxxxxx> wrote:
> Hi,
> 
> So I figured out that the problem with "Can't lock ref" was down to not
> having set one of the scripts executable on the http server. Great.
> 
> Anyway, now I would like to change an existing log entry to make it a
> bit cleaner (read: add a first line that's under 80 characters). What's
> the best way to change an existing log entry for a commit?

If its the most recent commit on that branch, "git commit --amend".

Otherwise dump out the branch to patches with git format-patch,
amend the commit in question, then replay the patches with git am.

Or use StGIT to uncommit the changes, pop them off, fix the commit,
then repush the patches and recommit in StGIT.


Note that any of the above methods change the SHA1 of that commit
and every commit which follows it on that branch.  Consequently it
is generally considered to be impolite to edit commits without
warning which you have already published, as another person may be
basing their own work off that commit.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]