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
28
votes
3 answers

Git: Is there an equivalent to hg strip?

I have a repo where I made a change that is causing merge hell and I'd like to pretend it never existed. Long, complicated story involving splicing a pre-existing repo on top of one that is updated via git-p4, but the upshot is I really, really want…
escouten
  • 2,883
  • 2
  • 21
  • 23
28
votes
2 answers

p4merge error [GIT]

I am trying to use p4merge with git but I am getting: Error starting p4merge: "path/myFile" is (or points to) an invalid file (this lists the BASE, LOCAL, REMOTE, and standard version of the file). Git tells me about the conflict then it asks if I…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
16
votes
3 answers

Getting the whole files history with git-p4

As I've mentioned in a previous question, I'm looking into migrating our source control from Perforce to git. Looking around, I've found git-p4 (you have to dig a bit more, since it's not even at the repository pointed by the link. The actual git-p4…
joce
  • 9,624
  • 19
  • 56
  • 74
16
votes
4 answers

Migrating from git to Perforce

I have the task of migrating my team & source from git to Perforce, and I'm looking for ideas on how to move the git history into p4. I would be happy moving master branch only. However, even that is proving problematic. I'm using the wonderful…
Graham Perks
  • 23,007
  • 8
  • 61
  • 83
11
votes
5 answers

Unable to execute - Git P4 clone broken

After git installation - I tried to clone an existing p4 branch, but it failed with the following information: c:\P4_GIT\DT>git p4 clone //depot/CTAT/Windows/OneP/ fatal: 'p4' appears to be a git command, but we were not able to execute it. Maybe…
Ulysses
  • 5,616
  • 7
  • 48
  • 84
10
votes
5 answers

`git-p4 clone` fails "new tip ... does not contain ..."

I'm runnining on Windows, with the windows p4 client, and git installed via Cygwin. The p4 client advertises how its syntax is regular across platforms and all that, so that should be hunky-dory. So when I go to git-p4 clone --verbose…
bsberry
  • 954
  • 1
  • 10
  • 24
10
votes
2 answers

How to get --detect-branches to work with git-p4?

My p4 repository has a structure similar to: //depot/project/branch1 //depot/project/branch2 //depot/project/branch3 ... etc However, when I use git-p4 to clone "project", all 3 branches are not considered as branches and all get cloned into the…
Michael Brennan
  • 1,031
  • 8
  • 19
9
votes
4 answers

How to clone branch with git-p4?

I did: git p4 clone //depot/path/to/project/trunk/@all project to create the master branch of project. Now I want to clone //depot/path/to/project/release to the release branch of project. How is that done? UPDATE: Using --detect-branches doesn't…
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
9
votes
1 answer

Integrate existing Git Repository with Perforce (P4)

I have browsed through the web, but I cannot find an answer. What I am trying to do is the following: I have a git repository which has been used for over 1 year with lots of commits Due to productization, the code has to be moved into a P4…
Philipp Herzig
  • 350
  • 6
  • 10
8
votes
3 answers

git-p4: fatal: git was built without support for git-p4 (NO_PYTHON=1)

I am trying to use git p4 on my Linux computer. But there seems to be a problem with git-p4 for some reason. When I run the git p4 command I get: fatal: git was built without support for git-p4 (NO_PYTHON=1) Any idea why this message is being…
MaACAn
  • 313
  • 3
  • 9
8
votes
3 answers

Extending `git-p4` clientspec after initial clone

After doing a git-p4 clone --use-clientspec, I would like to add an extra entry to the clientspec, and import the current state of the added entry to my Git repository. After I extend the clientspec, a git-p4 rebase does nothing (probably because…
Remko
  • 823
  • 6
  • 16
8
votes
3 answers

git p4 submit: patch does not apply

Lately I've been running into issues using git-p4. My current workflow is: git checkout -b some_feature # do some work and commit to some_feature branch git checkout master git merge --no-ff some_feature git p4 rebase git p4 submit Not always, but…
Jared
  • 4,567
  • 2
  • 26
  • 30
7
votes
2 answers

git-p4 submit fails with patch does not apply

When I do the following: $ git-p4 submit I wind up with the following error trace: error: patch failed: foo/bar/blah.h:1 error: foo/bar/blah.h: patch does not apply Unfortunately applying the change failed! What do you want to do? [s]kip this patch…
escouten
  • 2,883
  • 2
  • 21
  • 23
7
votes
5 answers

git-p4 -- any great explanations for how it works

If you use perforce remotely and desire to have the awesome speed of git for tracking diffs, here is the solution: http://kb.perforce.com/article/1417/git-p4 However, I've noticed the following: Follow the instructions exactly It can take a while…
justingordon
  • 12,553
  • 12
  • 72
  • 116
7
votes
1 answer

Trouble importing all perforce branches into git repo

I'm trying to import a project from my company's Perforce depot into a git repository. I've been successful getting a single branch into a single git repo, but what I'd like to do is to pull in the entire project plus all branches, but I can't get…
Grant Limberg
  • 20,913
  • 11
  • 63
  • 84
1
2 3
8 9