All of lore.kernel.org
 help / color / mirror / Atom feed
* importing two different trees into a fresh git repo
@ 2013-02-05 21:46 Constantine A. Murenin
  2013-02-05 22:29 ` Junio C Hamano
  2013-02-06  9:07 ` Jeff King
  0 siblings, 2 replies; 4+ messages in thread
From: Constantine A. Murenin @ 2013-02-05 21:46 UTC (permalink / raw)
  To: git

Hi,

I have two distinct trees that were not managed by any RCS, and I'd
like to import them into a single repository into two separate orphan
branches, then make sense of what's in there, merge, and unify into
'master'.

(To give some context, it's /etc/nginx config files from nginx/1.0.12
on Debian 6 and nginx/1.2.2 on OpenBSD 5.2.)

I've encountered two problems so far:

0. After initialising the repository, I was unable to `git checkout
--orphan Debian-6.0.4-nginx-1.0.12` -- presumably it doesn't work when
the repo is empty?  This sounds like a bug or an artefact of
implementation.  I presume this can be worked around by committing
into master instead, and then doing `git checkout -b
Debian-6.0.4-nginx-1.0.12`, and then force-fixing the master somehow
later on.

1. After making a mistake on my first commit (my first commit into
OpenBSD-5.2-nginx-1.2.2 orphan branch ended up including a directory
from master by mistake), I am now unable to rebase and "fixup" the
changes -- `git rebase --interactive HEAD~2` doesn't work, which, from
one perspective, makes perfect sense (indeed there's no prior
revision), but, from another, it's not immediately obvious how to
quickly work around it.

Any suggestions?

It would seem like making some kind of a dummy first commit into
master would be the best workaround for both of these problems.  Is
that basically the suggested approach?

Best regards,
Constantine.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-06  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-05 21:46 importing two different trees into a fresh git repo Constantine A. Murenin
2013-02-05 22:29 ` Junio C Hamano
2013-02-06  0:35   ` Constantine A. Murenin
2013-02-06  9:07 ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.