BOINC AI Hub
  • 🌍BOINC AI Hub
  • 🌍Repositories
  • Getting Started with Repositories
  • Repository Settings
  • Pull Requests & Discussions
  • Notifications
  • Collections
  • 🌍Webhooks
    • How-to: Automatic fine-tuning with Auto-Train
    • How-to: Build a Discussion bot based on BLOOM
    • How-to: Create automatic metadata quality reports
  • Repository size recommendations
  • Next Steps
  • Licenses
  • 🌍Models
  • The Model Hub
  • 🌍Model Cards
    • Annotated Model Card
    • Carbon Emissions
    • Model Card Guidebook
    • Landscape Analysis
  • Gated Models
  • Uploading Models
  • Downloading Models
  • 🌍Integrated Libraries
    • Adapter Transformers
    • AllenNLP
    • Asteroid
    • Diffusers
    • ESPnet
    • fastai
    • Flair
    • Keras
    • ML-Agents
    • PaddleNLP
    • RL-Baselines3-Zoo
    • Sample Factory
    • Sentence Transformers
    • spaCy
    • SpanMarker
    • SpeechBrain
    • Stable-Baselines3
    • Stanza
    • TensorBoard
    • timm
    • Transformers
    • Transformers.js
  • 🌍Model Widgets
    • Widget Examples
  • Inference API docs
  • Frequently Asked Questions
  • 🌍Advanced Topics
    • Integrate a library with the Hub
    • Tasks
  • 🌍Datasets
  • Datasets Overview
  • Dataset Cards
  • Gated Datasets
  • Dataset Viewer
  • Using Datasets
  • Adding New Datasets
  • 🌍Spaces
  • 🌍Spaces Overview
    • Handling Spaces Dependencies
    • Spaces Settings
    • Using Spaces for Organization Cards
  • Spaces GPU Upgrades
  • Spaces Persistent Storage
  • Gradio Spaces
  • Streamlit Spaces
  • Static HTML Spaces
  • 🌍Docker Spaces
    • Your first Docker Spaces
    • Example Docker Spaces
    • Argilla on Spaces
    • Label Studio on Spaces
    • Aim on Space
    • Livebook on Spaces
    • Shiny on Spaces
    • ZenML on Spaces
    • Panel on Spaces
    • ChatUI on Spaces
    • Tabby on Spaces
  • Embed your Space
  • Run Spaces with Docker
  • Spaces Configuration Reference
  • Sign-In with BA button
  • Spaces Changelog
  • 🌍Advanced Topics
    • Using OpenCV in Spaces
    • More ways to create Spaces
    • Managing Spaces with Github Actions
    • Custom Python Spaces
    • How to Add a Space to ArXiv
    • Cookie limitations in Spaces
  • 🌍Other
  • 🌍Organizations
    • Managing Organizations
    • Organization Cards
    • Access Control in Organizations
  • Billing
  • 🌍Security
    • User Access Tokens
    • Git over SSH
    • Signing Commits with GPG
    • Single Sign-On (SSO)
    • Malware Scanning
    • Pickle Scanning
    • Secrets Scanning
  • Moderation
  • Paper Pages
  • Search
  • Digital Object Identifier (DOI)
  • Hub API Endpoints
  • Sign-In with BA
Powered by GitBook
On this page
  • Next Steps
  • How to programmatically manage repositories
  • Learning more about Git
  • How to use branches
  • Using tags
  • How to duplicate or fork a repo (including LFS pointers)

Next Steps

PreviousRepository size recommendationsNextLicenses

Last updated 1 year ago

Next Steps

These next sections highlight features and additional information that you may find useful to make the most out of the Git repositories on the BOINC AI Hub.

How to programmatically manage repositories

BOINC AI supports accessing repos with Python via the . The operations that we’ve explored, such as downloading repositories and uploading files, are available through the library, as well as other useful functions!

If you prefer to use git directly, please read the sections below.

Learning more about Git

A good place to visit if you want to continue learning about Git is . For even more background on Git, you can take a look at .

How to use branches

To effectively use Git repos collaboratively and to work on features without releasing premature code you can use branches. Branches allow you to separate your “work in progress” code from your “production-ready” code, with the additional benefit of letting multiple people work on a project without frequently conflicting with each others’ contributions. You can use branches to isolate experiments in their own branch, and even .

To learn about Git branching, you can try out the .

Using tags

Git allows you to tag commits so that you can easily note milestones in your project. As such, you can use tags to mark commits in your Hub repos! To learn about using tags, you can visit .

Beyond making it easy to identify important commits in your repo’s history, using Git tags also allows you to do A/B testing, , and more! The boincai_hub library also supports working with tags, such as .

How to duplicate or fork a repo (including LFS pointers)

If you’d like to copy a repository, depending on whether you want to preserve the Git history there are two options.

Duplicating without Git history

Duplicating with the Git history (Fork)

A duplicate of a repository with the commit history preserved is called a fork. You may choose to fork one of your own repos, but it also common to fork other people’s projects if you would like to tinker with them.

For example, say you have an upstream repository, upstream, and you just created your own repository on the Hub which is myfork in this example.

  1. Clone your fork repository:

Copied

git clone git@hf.co:me/myfork
  1. Fetch non-LFS files:

Copied

cd myfork
git lfs install --skip-smudge --local # affects only this clone
git remote add upstream git@hf.co:friend/upstream
git fetch upstream
  1. Fetch large files. This can take some time depending on your download bandwidth:

Copied

git lfs fetch --all upstream # this can take time depending on your download bandwidth

4.a. If you want to completely override the fork history (which should only have an initial commit), run:

Copied

git reset --hard upstream/main

4.b. If you want to rebase instead of overriding, run the following command and resolve any conflicts:

Copied

git rebase upstream/main
  1. Prepare your LFS files to push:

Copied

git lfs install --force --local # this reinstalls the LFS hooks
boincai-cli lfs-enable-largefiles . # needed if some files are bigger than 5GB
  1. And finally push:

Copied

git push --force origin main # this can take time depending on your upload bandwidth

Now you have your own fork or rebased repo in the Hub!

In many scenarios, if you want your own copy of a particular codebase you might not be concerned about the previous Git history. In this case, you can quickly duplicate a repo with the handy ! You’ll have to create a User Access Token, which you can read more about in the .

Note that you will need to and the to follow this process. When you want to fork or a repository with LFS files you cannot use the usual Git approach that you might be familiar with since you need to be careful to not break the LFS pointers. Forking can take time depending on your bandwidth because you will have to fetch and re-upload all the LFS files in your fork.

Create a destination repository (e.g. myfork) in

boincai_hub library
this Git tutorial
GitHub’s Git Guides
adopt team-wide practices for managing branches
Learn Git Branching interactive tutorial
this DevConnected post
clone a repository at a specific tag
downloading files from a specific tagged commit
Repo Duplicator
security documentation
install Git LFS
boincai_hub CLI
rebase
https://boincai.com