3

I created a P4 client view spec and made a git-p4 clone with it, and periodically sync changes from P4, it works very well. One day I want to add another P4 path to the Git repository I cloned, it stucks. Even I added the new path to my client view spec used by git-p4 clone, it does not bring the new path to Git repository. Is it possible to do so?

Best Regards,

Skywolf
  • 683
  • 10
  • 21
  • Did you pass `--use-client-spec` to `git p4 clone`? – benj Jan 22 '14 at 14:28
  • I've described (what I believe to be) a working solution to http://stackoverflow.com/questions/21376692/extending-git-p4-clientspec-after-initial-clone (even though this question was asked first, I think that the other question was slightly better worded). – jamesdlin May 16 '15 at 18:19
  • A different solution is in https://stackoverflow.com/questions/25175539/git-clone-multiple-p4-paths-in-one-git-repo. I comment in both of these answers explaining why jamesdlin's worked for me, but the other one did not. – JeffJ Feb 16 '19 at 21:19
  • Agreed the other is worded well. My web search found the other, did not find this one. – JeffJ Feb 16 '19 at 21:21

1 Answers1

1

I realized I can use "git-p4 sync" to add new path besides adding the new path to client spec. So the solution should be:

  1. Add new path to cient view spec and ensure p4 can sync the path;
  2. Run "git-p4 sync " to add the new path.

Hope it helps.

Skywolf
  • 683
  • 10
  • 21
  • This will add the new path to the Perforce tree, but it doesn't automatically add it to the Git tree. (Using `git p4 rebase`/`git p4 sync` will add files from that path to your git tree *if* the imported Perforce changes happened to touch those files, but untouched files won't be imported.) – jamesdlin May 16 '15 at 00:53