git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tor Arvid Lund <torarvid@gmail.com>
To: Vitor Antunes <vitor.hda@gmail.com>
Cc: git@vger.kernel.org, Endre Czirbesz <endre@czirbesz.hu>,
	Ian Wienand <ianw@vmware.com>
Subject: Re: git to p4 conversion
Date: Fri, 4 Feb 2011 10:25:18 +0100	[thread overview]
Message-ID: <AANLkTikfGapDfZtD9H10797Ted_Av78WD8M7XrACOCpW@mail.gmail.com> (raw)
In-Reply-To: <loom.20110204T004658-497@post.gmane.org>

[on this mailing list, please don't cull the CC list]

On Fri, Feb 4, 2011 at 1:03 AM, Vitor Antunes <vitor.hda@gmail.com> wrote:
> Hi Endre,
>
<snip>
> I think what you should do is add the git repository as a remote with something
> like:
>
> git remote add remotename myprojectrepo
> git pull remotename master
> git p4 submit

That's not what I would do... When I try this, the 'git pull ...'
creates a merge, which I don't want to do when using git-p4.

But I think we're close to something that would work ok:

Endre, you should start like you already have; by git-p4 cloning your
project from perforce. (You maybe want to have a dummy file checked in
to your <projectdir> in perforce, so that the 'git-p4 clone' command
produces at least one commit in your git repo)...

Then, do 'git remote add tempremote <path-to-your-existing-git-repo>'
like Vitor suggests.

At this point I would do:

$ git checkout -b tempbranch tempremote/master
$ git rebase master
$ git-p4 submit

So, the 'git rebase master' should be like applying each of your
existing git commits *on-top-of* the git-p4 branch that you already
have. And that is the key to git-p4 knowing what to push to the
perforce server.

Thus, if I wanted to get all my existing git history into perforce,
this is how I would do it.

    -- Tor Arvid

  reply	other threads:[~2011-02-04  9:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 13:52 git to p4 conversion Endre Czirbesz
2011-02-03 18:23 ` Ian Wienand
2011-02-03 19:50   ` Endre Czirbesz
2011-02-04  0:03     ` Vitor Antunes
2011-02-04  9:25       ` Tor Arvid Lund [this message]
2011-02-04 10:49         ` Endre Czirbesz
2011-02-04 14:01           ` Tor Arvid Lund
2011-02-04 16:08             ` Endre Czirbesz
     [not found]               ` <AANLkTimGaPQ=hRp+2pvw-hAOg+wp50nvc_sv9jNTay=n@mail.gmail.com>
2011-02-04 16:52                 ` Endre Czirbesz
2011-02-05  0:53                   ` Tor Arvid Lund
2011-02-05  1:11                     ` Vitor Antunes
2011-02-07 13:57                       ` Endre Czirbesz
2011-02-07 14:13                         ` Tor Arvid Lund
2011-02-07 15:07                           ` Endre Czirbesz

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=AANLkTikfGapDfZtD9H10797Ted_Av78WD8M7XrACOCpW@mail.gmail.com \
    --to=torarvid@gmail.com \
    --cc=endre@czirbesz.hu \
    --cc=git@vger.kernel.org \
    --cc=ianw@vmware.com \
    --cc=vitor.hda@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).