3

For this moment I have a Git repo that synced to the main p4 depot and works fine. But its size is far more than 4Gb. And we need to move it to BitBucket, where 2Gb is the maximum limit. What I want to achieve:

  1. Put 1 folder and 1 file extension under LFS.
  2. Migrate repo to the BitBucket.
  3. Make it sync both ways with p4 depot.

Assumption for point 1 is to use BFG Repo cleaner. Is it suitable for folders?
Is it possible to achieve point 3?

orkenstein
  • 2,810
  • 3
  • 24
  • 45

1 Answers1

2

Assumption for point 1 is to use BFG Repo cleaner.

According to recent edits to the Git LFS wiki, BFG is not currently the preferred tool for this migration, you want bozaro:git-lfs-migrate. That is likely due to limitations in the BFG support for this migration, which include multi-glob support etc.

Is it suitable for folders?

Yes but perhaps not in the way you hope, hence git-lfs-migrate. BFG cannot process qualified/absolute paths, only paths by relative-name.

Make it sync both ways with p4 depot.

I think so, see https://developer.atlassian.com/blog/2015/01/work-with-git-and-perforce/ .

javabrett
  • 7,020
  • 4
  • 51
  • 73
  • 1
    I ended up with similar solutions you shared. BFG cleaner BTW supports LFS transition now. But now the problem is: when somebody modifies LFS file in p4, its' binary changes (but in Git there is instead a hash-value). After that Git-p4 rebase tool goes nuts and spoils the last Git commit with kinda combined history. – orkenstein Nov 02 '16 at 12:03
  • Any update on how to perform git p4 rebase after you have used git lfs migrate on the history? Is there a way to skip through all the rebase errors with git rebase --skip since there are thousands of commits to do this for? – BrownianBread Oct 20 '20 at 17:57