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
7
votes
5 answers

How can I set up Git for local commits while using P4 for remote commits?

Where I work uses a Perforce environment but we are not allowed to check in until our features are completed and ready to be tested. I need to be able to do local commits because at times I have had upwards of 50 files checked out for a week without…
Sky
  • 71
  • 1
7
votes
2 answers

How to unshelve changes using git-p4

Latest git-p4 script (https://github.com/ermshiperete/git-p4) has a "shelve" but no "unshelve" command. How do I unshelve changes using it?
Paweł Krupiński
  • 1,406
  • 1
  • 14
  • 23
6
votes
3 answers

git-p4 migrate branches in different subdirectories

I want to migrate source code tree from perforce to git. The source code contains several dev branches scattered across perforce depot, not necessarily in the same directory. for example the structure is something like this -…
Amar Kumbhar
  • 331
  • 3
  • 11
6
votes
2 answers

git-p4 submit fails with "Not a valid object name HEAD~261"

I've got a git repository that I'd like to mirror to a Perforce repository. I've downloaded the git-p4 script (the more recent version that doesn't give deprecation warnings), and have been working with that. I've figured out how to pull changes…
Harlan
  • 18,883
  • 8
  • 47
  • 56
6
votes
1 answer

git p4 clone has no files

I'm migrating from Perforce to git, and in the process I'm trying to get the file structure right. The current perforce structure is something like this: //depot /android /main /other_branches /core_library …
keyboardr
  • 841
  • 1
  • 8
  • 20
6
votes
3 answers

git p4 submit fails

I tried running git p4 submit on a repo that I've been running as an interim bridge between git and perforce. Multiple people are using the repo as a remote and its being periodically submitted back to perforce. It's been working mostly fine, except…
TinyGrasshopper
  • 2,190
  • 2
  • 17
  • 28
6
votes
1 answer

git-p4 clone a single file

I want to use git to do some temporary management of a specific file. There are many files in that directory structure that I don't want (and git would not handle well), but I need to use its patch management capabilities for this one file. I want…
Jonathan Sternberg
  • 6,421
  • 7
  • 39
  • 58
5
votes
1 answer

What is the purpose of Perforce file ".perforce"?

What is the purpose of Perforce configuration file .perforce? Where may I find a sample file showing its contents? Git-p4 Usage refers to this file, but I don't have this file in any of my workspaces nor in my home directory and have not seen this…
Derek Mahar
  • 27,608
  • 43
  • 124
  • 174
5
votes
1 answer

unable to import with git-p4 on windows

I've been trying to import a p4 depot path to git using git-p4 python script. After configuring my environment (git 1.7.1, python 2.7, Windwos XP, p4 env variables) I tried to run the git-p4 script, geetting the following…
Tate
  • 1,456
  • 1
  • 12
  • 13
5
votes
2 answers

git-p4 message and author encoding

today i am in the position to migrate some pretty old perforce repositories to git. While this is realy interesting there is one thing that caught my eye. All special characters in the commit messages and even the author names are not in the correct…
dag
  • 1,133
  • 12
  • 25
5
votes
2 answers

Is it possible to clone git-p4 repo?

Is it possible to git clone existing git p4 repository so it will be possible to use git p4 for the new repository? Here is the usecase: I have desktop PC with full repository cloned from perforce (git p4 clone @all) an want to clone it to…
Equidamoid
  • 1,447
  • 1
  • 13
  • 24
5
votes
1 answer

Cloning a Partial Perforce Repo with git-p4

What is the proper method to do a selective import of a large Perforce repo? The git-p4 docs mention that you can do a -//depot/main/ignore switch to filter directories. Would this be equivalent to running a git filter-branch to remove the same…
cmcginty
  • 113,384
  • 42
  • 163
  • 163
4
votes
1 answer

git2p4 submit fails because of illegal characters in filenames

Our team uses git2p4 to develop locally on github repo and then submit it to perforce. For eg. /home/workspace/src/ - the git repo code (changes present) /home/workspace_p4git/src - the local client workspace associated to a depot on…
Swanand
  • 43
  • 2
4
votes
2 answers

git-p4 How to fetch a changelist

git p4 submit --shelve takes your committed changes in the local git repo and puts them in a changelist X and shelves them. Let's say I did some code reviews on the shelved changes, and so the files in my local git repo are not the same as the…
Mr. Fegur
  • 797
  • 1
  • 6
  • 18
4
votes
1 answer

git-p4 sync on different branch and repo

I'm trying to mirror a perforce repository, and git-p4 performs well enough on the main branch. I simply have to call git-p4 rebase. I'm also trying to mirror a different branch, but that's not working out so easily. I thought I could just do a…
Kevin
  • 91
  • 1
  • 5
1
2
3
8 9