Re: git to p4 conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

On Fri, Feb 4, 2011 at 1:03 AM, Vitor Antunes <vitor.hda@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]