-
Notifications
You must be signed in to change notification settings - Fork 2
Technical Guide to Clone a Public Repository into a Private Repository for FinTorch
To create a private version of the public FinTorch repository for personal or company-specific modifications, follow these steps:
First, create a temporary bare clone of the FinTorch repository. Perform this step in any directory, as it's temporary.
git clone --bare https://github.com/AI4FinTech/FinTorch.gitGo to GitHub and create a new private repository named FinTorch. If you're unable to create a private repository, consider applying for GitHub's Student Developer Pack for unlimited private repositories if eligible.
Next, push the bare clone to your newly created private repository using HTTP. Replace <your_username> with your GitHub username and <your_repo> with your repository name.
cd FinTorch.git
git push --mirror https://github.com/<your_username>/<your_repo>.gitAfter mirroring, remove the temporary local repository created in step 1.
cd ..
rm -rf FinTorch.gitClone your new private FinTorch repository to your local machine for development. Replace <your_username> and <your_repo> with your GitHub username and your repository name, respectively.
git clone https://github.com/<your_username>/<your_repo>.gitTo keep your private repository updated with the original FinTorch repository, add the original as an upstream remote. Disable push to upstream to avoid accidental modifications.
cd <your_repo>
git remote add upstream https://github.com/AI4FinTech/FinTorch.git
git remote set-url --push upstream DISABLEVerify your remote configuration:
git remote -vYou should see your fork as origin and the original FinTorch repository as upstream with push disabled.
To update your private repository with changes from the original FinTorch repository:
git fetch upstream
git rebase upstream/mainResolve any conflicts that arise during the rebase process.
Following these steps, your private FinTorch repository will be set up and ready for development, allowing for both contributions to the open-source community and proprietary modifications without affecting the public source.