git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git to p4 conversion

From
Endre Czirbesz <endre@czirbesz.hu>
Date
Feb 4, 2011, 10:49 UTC
Message-ID
<AANLkTimrwUxNOAnfxgvReGN+-h4_0jhZ731y22TB6u1K@mail.gmail.com>
In-Reply-To
<AANLkTikfGapDfZtD9H10797Ted_Av78WD8M7XrACOCpW@mail.gmail.com>
Hi All,
Thanks for the replies.
2011/2/4 Tor Arvid Lund <torarvid@gmail.com>:
> On Fri, Feb 4, 2011 at 1:03 AM, Vitor Antunes <vitor.hda@gmail.com> wrote:
>> git remote add remotename myprojectrepo
Show 11 quoted lines
> 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

At this point I got an error message: fatal: git checkout: updating paths is incompatible with switching branches.

So I fetched my tempremote first: $ git fetch tempremote $ git checkout -b tempbranch tempremote/master (I got a warning from fetch, that there are no common commits, but I supposed that it is right. :) )

> $ git rebase master
It applied all my commits.
> $ git-p4 submit
  Synchronizing p4 checkout...
  ... - file(s) up-to-date.
  Applying 1##############################9 Initial commit
  error: ***: already exists in working directory
[...]
  Unfortunately applying the change failed!

It said this error for all my files. :( But I think we are almost there. :)

Regards,
Endre
Previous: Tor Arvid LundNext: Tor Arvid Lund
Message 6 of 14 in “git to p4 conversion”
  1. Endre CzirbeszFeb 3, 2011
  2. Ian WienandFeb 3, 2011
  3. Endre CzirbeszFeb 3, 2011
  4. Vitor AntunesFeb 4, 2011
  5. Tor Arvid LundFeb 4, 2011
  6. Endre CzirbeszFeb 4, 2011
  7. Tor Arvid LundFeb 4, 2011
  8. Endre CzirbeszFeb 4, 2011
  9. Endre CzirbeszFeb 4, 2011
  10. Tor Arvid LundFeb 5, 2011
  11. Vitor AntunesFeb 5, 2011
  12. Endre CzirbeszFeb 7, 2011
  13. Tor Arvid LundFeb 7, 2011
  14. Endre CzirbeszFeb 7, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.