English 中文(简体)
Anything similar to git-svn for Perforce?
原标题:
  • 时间:2009-12-23 18:36:16
  •  标签:
  • git
  • perforce

Is there a tool that allows me to gain the same functionality as git-svn for Perforce? I saw git-p4 on github but it looks like this imports source from a git repo to a Perforce repo. Does it go the other way around? Is it intended to be used as a frequent tool or just a 1 time, import-only type of tool?

Scenario: I am a contractor, my client uses Perforce for their source control, but I would like to use git locally.

问题回答

git-p4 can go both ways. Use git-p4 sync or git-p4 rebase to update your local workarea, then use git locally. When ready to submit your git commits into p4, use git-p4 submit.

You will need to create a P4 client (in a separate place from your git workarea) and use it exclusively for synchronizing using git-p4.

I use this locally and it has been working well for months, with a few caveats:

  • You can use git branches locally but P4 will not know anything about them. It will see only master.

  • File renames will show up in P4 as add+delete instead of the preferred integrate+delete.

  • Git commits are recreated when running git-p4 submit, so the timestamp will be off, and you may have merge issues with your other git branches. (Just like the "recover from upstream rebase" problem.)





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签