Questions tagged [git-p4]

The git p4 command provides a way to interact with p4 repositories using git.

The git-p4 command, part of the git suite, allows you to create a git repository by importing from a Perforce repository and to sync updates from and submit changes to the Perforce repository.

132 questions
4
votes
5 answers

Looking for a way to sync Perforce <-> Git

Our team is looking to migrate our perforce server over to Git. Is there a way to sync check-ins from a branch in our Github Server back to Perforce to keep them in sync? I have been looking at git-p4 and there seems to be lots of documentation of…
bobster
  • 41
  • 1
  • 2
4
votes
1 answer

git p4 port error leads to fail

I am trying to implement git p4 for some developers so they can be using Perforce instead of git, but we still need git to push things later on. While trying to do the initial clone of the Perforce depot path, I am getting the following…
4
votes
1 answer

Sync exists git repo with p4 repo and continue working

How can I sync my git repos (with own history) to p4 repo (with own history) but files in this repos on HEAD is the same. I do git clone git@git.dev.local:qwerty.git cd qwerty git p4 sync //path/in/your/perforce/depot Got this graph What should I…
ButuzGOL
  • 1,233
  • 2
  • 13
  • 27
4
votes
3 answers

git-p4 is eating my image files

So, I can import from p4 using git-p4 without any problem. Everything seems to work, but my PNG files (and perhaps others) are getting corrupted. I've read about gitattributes and the line ending issues, but nothing I do seems to change the end…
4
votes
1 answer

How to git-p4 clone from the middle of a perforce repo?

I'd like to clone the second half of my repo. It works correctly using the command: git-p4 clone --detect-branches //depot@all So I want to run something like below, but it does not import the files the same way and eventually fails: git-p4 clone…
cmcginty
  • 113,384
  • 42
  • 163
  • 163
4
votes
1 answer

git-p4 migrates perforce "main" branch into git branches as subdirectories (doubled code in git branches)

The Situation Trying to migrate 1 "main" and 2 branches from perforce to git. After mapping the branches in perforce with specs, I tried a typical migration which resulted in code directory duplication issues. The Problem When running "git p4"…
3
votes
1 answer

How do you keep a Perforce repo downstream of git updated?

At my company, we're starting a pilot program to use GitHub:Enterprise and determine if it is a suitable replacement for Perforce. Until such a time as the company is comfortable with it, we're going to be using both systems, though individual teams…
DannoHung
  • 391
  • 1
  • 3
  • 10
3
votes
1 answer

Tracking a remotes/p4/master branch in git

I'm cloning a repo that was first generated by git-p4. git-p4 uses a 'remotes/p4/master' branch that I would like to track. How do I tell git, which is cloning that repo, to track remotes/p4/master as well? That way I would be able to check out…
joshk0
  • 2,574
  • 2
  • 25
  • 36
3
votes
0 answers

Can I cherry-pick from a perforce repo to another git hub repo?

I have one android project in perforce and one iOS project in github. Same project for different platforms. They share some file. Can I cherrypick certain changes to my github repo from perforce? Right now, I do the work manually and it is very…
Fuad
  • 31
  • 5
3
votes
1 answer

git-p4 submission failure

I am using git-p4 to work with git locally and trying to submit my changes back to the perforce server. Its the submitting changes back to the server that I am failing to do. I have a client set up so that it includes all the library dependencies in…
user231536
  • 2,661
  • 4
  • 33
  • 45
3
votes
1 answer

os.path.split seems to be returning wrong

I can't understand what os.path.split is doing. I'm debugging a program (specifically git's interface with Perforce: git-p4) and seeing that os.path.split is splitting the incoming path in ways the script isn't expecting, and also seems…
ojchase
  • 1,041
  • 1
  • 10
  • 22
3
votes
0 answers

How to handle git-p4 with special workspace mapping

I'm trying to make a git repo that I can push master to perforce. I'm thinking useing git+gitflow and rebase into master to update upstream. This is to increase collaboration between developers on expreimental branches and to still have a way to…
Sylwester
  • 47,942
  • 4
  • 47
  • 79
3
votes
2 answers

git p4 sync operation failure

I am using "git-p4" script for migration from p4 to GIT. clone operation is failing due to large number of change list (about 5 million). So I am trying to perform incremental import operation: I tried to clone for first run then sync operation. I…
Kester
  • 89
  • 2
  • 4
3
votes
2 answers

Efficiently backup many versions of a git repo with branch namespacing

At work, we use Perforce for version control. There are problems with this: 1) with this centralized model, we can't check in changes until they are ready for regression. This means that we have no revision control during the development process. …
masonk
  • 9,176
  • 2
  • 47
  • 58
3
votes
1 answer

Git P4 under Cygwin: Submit fails with "Patch does not apply"

I'm attempting to use git-p4 under Cygwin. The "clone" and "rebase" parts of the workflow appear to be working correctly, but I am unable to "submit". I'm guessing it may have something to do with a line-ending convention. I've looked at this…
jstevenco
  • 2,913
  • 2
  • 25
  • 36
1 2
3
8 9