I am trying to migrate the repository from TFVC to Git with History of 4 months which is a huge data. I am using git tfs
to clone it from a branch of a repo from TFVC to my local and trying to push it to a empty Git repository by enabling git lfs
to track the large files and upload.
Steps: I cloned a TFVC repo branch files with history of 4 months using git tfs clone to my local. then, git remote add origin 'URL of the empty git repo' -- empty repo refers to my new git repo created.
Enabled LFS
Tracked the Large files
Made a commit
Migrated the LFS files using git lfs migrate import --include="*.*" --include-ref=refs/heads/master
The above successfully converts pre-existing git objects to lfs objects. However, the regular objects still persist in the .git directory. These will be cleaned up eventually by git, but to clean them up right away, run:
git reflog expire --expire-unreachable=now --all
git gc --prune=now
& Trying to push it using git push origin -u -all
But facing below error:
error: RPC failed; HTTP 503 curl 22 The requested URL returned error: 503
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date
##[error]PowerShell exited with code '1'.
Finishing: Migrate whole source code to git (git push)```