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

Re: bug in git-p4?

From
Tor Arvid Lund <torarvid@gmail.com>
Date
May 8, 2009, 11:43 UTC
Message-ID
<1a6be5fa0905080443h5c696f8es55ea5acf3b3025cb@mail.gmail.com>
In-Reply-To
<F98DA2FE6F6C464C860149518BD861CC3B3C13440A@SSDEXCH2.websense.com>
On Mon, May 4, 2009 at 9:20 PM, Mercier, Carl <cmercier@websense.com> wrote:
Show 18 quoted lines
> Hello all,
>
> I've been trying to use git-p4 without much success.  My setup is very simple:
>
> - 1 existing Git repo (with data)
> - 1 existing P4 depot (with an empty subdirectory)
> - We commit and push to Git and our company requires all the code to be stored in P4 (in the p4 empty subdir).
>
> Here's what I did:
>
> cd /root/p4-repo/SecTech
> git clone /home/git/repositories/web website
> cd website
> git-p4 sync //SecTech/website
> git branch --track p4-master p4/master
> git checkout p4-master
> git merge master
> git-p4 submit

Hi. What I try to do at my job, is to consider the P4 depot to be the "master" depot, since I consider it the "weaker" of the two VCSs. I have not had much success doing git merges and then trying to sync with P4. I instead use rebasing a lot. So what I would do in your situation is something like:

... git-p4 sync //SecTech/website git rebase p4/master git-p4 submit

So.. my normal flow of work is:

code commit code commit git p4 sync git rebase p4/master git p4 commit

Don't know if this is something that might work for you, though...
-Tor Arvid-
Previous: Mercier, CarlNext: Carl Mercier
Message 2 of 4 in “bug in git-p4?”
  1. Mercier, CarlMay 4, 2009
  2. Tor Arvid LundMay 8, 2009
  3. Carl MercierMay 8, 2009
  4. Daniel BarkalowMay 8, 2009

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.