* Import existing (old) topic branches in topgit
@ 2010-09-14 20:44 Guilhem Bonnefille
2010-09-15 4:55 ` martin f krafft
0 siblings, 1 reply; 2+ messages in thread
From: Guilhem Bonnefille @ 2010-09-14 20:44 UTC (permalink / raw)
To: Git List
Hi all,
After trying to manually maintain many topic branches before sending
them upstream, I recently discovered that topgit seems to become my
best friend.
But as I'm new to this tool, I don't know what's the best way to
import existing branches in topgit.
What I mean is:
* I already have topic branches, with long history and regular merges
with upstream.
* I want to manage the related topic via topgit
* I whish to keep my own history (if possible)
Can experimented users give me some tips on how to do this?
Thanks in advance.
--
Guilhem BONNEFILLE
-=- JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Import existing (old) topic branches in topgit
2010-09-14 20:44 Import existing (old) topic branches in topgit Guilhem Bonnefille
@ 2010-09-15 4:55 ` martin f krafft
0 siblings, 0 replies; 2+ messages in thread
From: martin f krafft @ 2010-09-15 4:55 UTC (permalink / raw)
To: Guilhem Bonnefille, Git List
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
also sprach Guilhem Bonnefille <guilhem.bonnefille@gmail.com> [2010.09.14.2244 +0200]:
> But as I'm new to this tool, I don't know what's the best way to
> import existing branches in topgit.
There is tg-import, but it looks like it rewrites the history, which
you might not want.
This should be trivially possible, and it would be nice if TopGit
could help you, but for now you will have to do this manually. The
following is an example for the simple case when branch foo depends
on master, and you want to convert foo:
1. git checkout foo # the topic branch
2. git update-ref refs/top-bases/foo $(git merge-base master HEAD)
3. echo master > .topdeps
4. git format-patch --stdout -s HEAD^ | sed -e 1d -e '/---/,$d' -e '/^Date:/d' > .topmsg
5. git add .top(deps|msg)
6. git commit -sm'convrting branch to topgit format'
7. tg summary
Now: will you write a new tg-import or tg-convert? ;)
Cheers,
--
martin | http://madduck.net/ | http://two.sentenc.es/
a: no.
q: should i include quotations after my reply?
spamtraps: madduck.bogus@madduck.net
[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-15 5:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 20:44 Import existing (old) topic branches in topgit Guilhem Bonnefille
2010-09-15 4:55 ` martin f krafft
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).