git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Howard Miller <howard@e-learndesign.co.uk>
Cc: git@vger.kernel.org
Subject: Re: Merging non-git releases of a project
Date: Fri, 9 Oct 2009 17:27:23 -0400	[thread overview]
Message-ID: <32541b130910091427i7c8a2426hb69a9914aabde8bc@mail.gmail.com> (raw)
In-Reply-To: <26ae428a0910091411i39a03650o51163f794b984524@mail.gmail.com>

On Fri, Oct 9, 2009 at 5:11 PM, Howard Miller
<howard@e-learndesign.co.uk> wrote:
> Here's my dilemma.... I've used git extensively to track modifications
> made to a reasonably large source tree. I do not have access to the
> repository for that project, just a given release. I have now acquired
> the latest version of that project and I want to 'merge' (not sure
> that's the right word in this case) my changes into the new version.
> Then I need to carry on using git for further changes. I think it
> should be simple but I can't get my head around the best way to do
> this.

Find out the commitid of the first commit when you checked in the
upstream project into git, and call it C1.

  git checkout -b vendor C1

(replacing C1 with the commitid).  This creates a branch called
'vendor' which is for checking in *only* the pristine code provided by
the vendor.  It also checks out this new branch.

Next, import the new upstream version of the project and commit it to
the 'vendor' branch.

Now, switch back to your branch and merge in the vendor changes:

  git checkout master
  git merge vendor

Or, if you want to produce a clean set of patches on top of the vendor
version (ie. for submitting the individual patches upstream), you
might want something like this instead:

  git rebase vendor

But be careful, rebasing can make a mess of your history and you
shouldn't do it unless you have a good reason.

Good luck.

Avery

  reply	other threads:[~2009-10-09 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 21:11 Merging non-git releases of a project Howard Miller
2009-10-09 21:27 ` Avery Pennarun [this message]
2009-10-09 21:33   ` Howard Miller
2009-10-09 22:43     ` Avery Pennarun
2009-10-10  8:47       ` Peter Baumann
2009-10-10  9:00         ` Björn Steinbrink
2009-10-10 10:04           ` Peter Baumann
2009-10-10  8:58       ` Howard Miller
2009-10-11 15:32         ` Avery Pennarun

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=32541b130910091427i7c8a2426hb69a9914aabde8bc@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=howard@e-learndesign.co.uk \
    /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).