From: "Dirk Süsserott" <newsletter@dirk.my1.cc>
To: Anner van Hardenbroek <dwlnetnl@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Question about rewrite commits
Date: Tue, 05 May 2009 21:46:25 +0200 [thread overview]
Message-ID: <4A009791.6010704@dirk.my1.cc> (raw)
In-Reply-To: <15aa6cf30905050445k21f8317bt7be65857604cc101@mail.gmail.com>
Hi Anner,
I had these 'cosmetic' problems as well and did the surgery like this:
I assume that your commits
'Introduced...',
'No HTML...', and
'A page can now ...'
are on branch 'master' and the righthand track is on branch
'console-mvc' which starts at 'Introduced...'.
Finally you did 'git checkout master; git merge console-mvc'.
I did the following:
- give a tag (say 'foo') to the 'No HTML...' commit
- rebase the console-mvc branch to that tag:
$ git rebase foo console-mvc
this will yield to a weird road map in gitk. Don't bother.
- rebase the master to the new console-mvc branch:
$ git rebase console-mvc master
the history will now be linear.
- remove the tag 'foo'
You may, of course, omit the tagging when you know the sha1's of the
commits. In your case you will, as they're displayed in gitk.
[ In theory there's a way to identify commits by their commit message
(see manpage of git-rev-parse), but I didn't make it work. As I
understood "git show :/foo" would mention the latest commit whose commit
message starts with 'foo', but I only got error messages. ]
Be noticed that rewriting history isn't a good idea if you already have
published your work. Your coworkers may get disturbed. ;-)
Hope this helps,
Dirk
Am 05.05.2009 13:45 schrieb Anner van Hardenbroek:
> Hi!
>
> I've a question about rewriting commits. I'd like to change the
> branches so that "Introduced BTRmxSoapArgument, second fase + code
> cleanup." is right below (a straight vertical line) "No HTML errors
> because we have nice ones!". How can I do that?
>
> Thanks,
> Anner.
>
> --
> Anner van Hardenbroek,
> dwlnetnl@gmail.com
>
>
> ------------------------------------------------------------------------
>
prev parent reply other threads:[~2009-05-05 19:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 11:45 Question about rewrite commits Anner van Hardenbroek
2009-05-05 12:52 ` Ferry Huberts (Pelagic)
2009-05-05 13:27 ` Anner van Hardenbroek
2009-05-05 19:46 ` Dirk Süsserott [this message]
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=4A009791.6010704@dirk.my1.cc \
--to=newsletter@dirk.my1.cc \
--cc=dwlnetnl@gmail.com \
--cc=git@vger.kernel.org \
/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).