From: Jakub Narebski <jnareb@gmail.com>
To: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: check if a commit is ascendent of a specific commit
Date: Sat, 11 Nov 2006 12:56:19 +0100 [thread overview]
Message-ID: <200611111256.20157.jnareb@gmail.com> (raw)
In-Reply-To: <fcaeb9bf0611110331q53522c50sda399d4a7916636d@mail.gmail.com>
Dnia sobota 11. listopada 2006 12:31, Nguyen Thai Ngoc Duy napisał:
> On 11/11/06, Jakub Narebski <jnareb@gmail.com> wrote:
>> You can only amend topmost commit in any branch. Anything else would
>> be rewriting history, starting from amended commit upwards in lineage
>> (parentage).
>
> Yes. That's what I want. I am tempted to edit older commits just
> because I forgot to add some entries to .gitignore that I should have
> added sooner :-)
In pure git you would have to create new branch at the commit you want
to amend, amend the commit (in this branch), and rebase (or cherry-pick
if you need to edit other commits too) the rest, then rename branch.
Or if you don't want ot loose reflog, tag/branch current branch, then reset
(rewind) current branch to the commit you want to amend, then cherry-pick.
Or you can use cg-admin-rewritehist tool from Cogito.
See: http://git.or.cz/gitwiki/GitTips
--
Jakub Narebski
next prev parent reply other threads:[~2006-11-11 11:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-11 11:08 check if a commit is ascendent of a specific commit Nguyen Thai Ngoc Duy
2006-11-11 11:15 ` Jakub Narebski
[not found] ` <fcaeb9bf0611110331q53522c50sda399d4a7916636d@mail.gmail.com>
2006-11-11 11:56 ` Jakub Narebski [this message]
2006-11-11 12:12 ` Karl Hasselström
2006-11-11 11:19 ` Nguyen Thai Ngoc Duy
2006-11-11 18:43 ` Junio C Hamano
2006-11-11 19:23 ` Tom Prince
2006-11-11 20:12 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611111256.20157.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).