Clean an External Repository Before Pushing it to a Project
If you’ve been using a Git repository on another platform, such as GitHub or Bitbucket, and are ready to have VB Studio manage the repository, it's a good idea to do a little cleanup before pushing the repository to VB Studio. For example, consider using Git Large File Storage (LFS) to store large files (more than 50 MB) or remove them altogether. If a Git repository has too many large files, operations, such as cloning, fetching, and pulling, can become extremely slow over time.
Let's look at the process.
Remove Large Files from an External Git Repository
Use Git commands to remove large files from an external Git repository before pushing it to VB Studio.
Use Git LFS to Add Large Files Back to a Git Repository
After removing large files from an external Git repository, you can add them back using Git Large File Storage (LFS), once the initial push to VB Studio is complete. Git LFS replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server. When you use Git LFS with VB Studio, files are stored in an OCI Object Storage bucket.
- In the VB Studio left navigator, click Organization > OCI Account, and look for this message: VBS instance configured in OCI console.
- If the message appears, your instance has access to OCI Object Storage. You can go ahead with using Git LFS to add large files back to the repository.
- If the message doesn't appear, your instance doesn't have access to OCI Object Storage. Before proceeding, you or an administrator will need to enable this for your VB Studio instance.
Here’s how to use Git LFS to add files back to a repository:
- In VB Studio, go to the Git page, and select your repository and branch from the Repositories drop-down list.
- Click any large file you tracked in Step 6. If Git LFS is working, you’ll see a pointer instead of the file.