git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Santi Béjar" <sbejar@gmail.com>
To: "Stefan Näwe" <stefan.naewe+git@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Q. regarding subtree merge
Date: Fri, 18 Apr 2008 12:09:54 +0200	[thread overview]
Message-ID: <8aa486160804180309o26ab9c69j2b3b665a280bf7c4@mail.gmail.com> (raw)
In-Reply-To: <8aa486160804180302m43a7c942la93954401741b264@mail.gmail.com>

On Fri, Apr 18, 2008 at 12:02 PM, Santi Béjar <sbejar@gmail.com> wrote:
>
> On Fri, Apr 18, 2008 at 11:36 AM, Stefan Näwe
>  <stefan.naewe+git@gmail.com> wrote:
>  > Hi all.
>  >
>  >  I tried the scenario described in
>  >  $GIT_DIR/Documentation/howto/using-merge-subtree.txt and have some problems
>  >  with it.
>  >
>  >  My setup:
>  >
>  >  I use git to track my changes in three different "project directories", lets
>  >  say:
>  >
>  >  ...../src_root/libfoo
>  >  ...../src_root/appbar
>  >  ...../bin_root/installed
>  >
>  >  All three git repositories contain a topic branch (lets say 'current-work')
>  >  that I want to track.
>  >
>  >  Now I want to setup one git repository containing only the three directories
>  >  'libfoo', 'appbar', and 'installed' that others can clone easily. Reading the
>  >  above howto document, I think this should be possible.
>  >
>  >  I do:
>  >
>  >   $ mkdir super-prj
>  >   $ cd super-prj
>  >   $ git init
>  >   $ git add remote -f libfoo ../path/to/src_root/libfoo
>  >
>  >  OK. No problem.
>  >
>  >  The problem arises after the second step of the howto:
>  >
>  >   $ git merge -s ours --no-commit libfoo/current-work
>  >
>  >  Now, all files of 'libfoo' are in the current directory. This is not what I
>  >  want.
>  >
>  >  Could someone please tell me what I'm doing wrong?
>
>  You are trying to merge libfoo with an empty project, so the merge
>  just "fast-forward" to the other commit as you do not have an "ours".
>
>  Simply skip the merge step.

Ups, I think you have to specify the parent for the new commit. Maybe
change the merge step with:

$ git reset --soft libfoo/current-work

Santi

  reply	other threads:[~2008-04-18 10:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18  9:36 Q. regarding subtree merge Stefan Näwe
2008-04-18 10:02 ` Santi Béjar
2008-04-18 10:09   ` Santi Béjar [this message]
2008-04-18 12:18     ` Stefan Näwe
2008-04-18 12:59       ` Santi Béjar

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=8aa486160804180309o26ab9c69j2b3b665a280bf7c4@mail.gmail.com \
    --to=sbejar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=stefan.naewe+git@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).