Are you sure you want to delete this access key?
title | description |
---|---|
Managing Code Versions with DagsHub | Learn how to manage your ML code with DagsHub |
DagsHub relies on Git for code versioning. It provides a hosted Git server with each project, or the ability to connect your existing repository from GitHub, GitLab, or Bitbucket, which lets you use your existing code, in a more machine learning-friendly interface.
For a beginners guide to Git check out this blog{rel=nofollow, target=_blank}.
If you're more advanced, and want to learn more about Git, check out Think Like (a) Git{rel=nofollow, target=_blank}.
Below is a simple example, that lets you create a new code version with DagsHub, it appears whenever you create a blank project with DagsHub.
# Clone a repository
git clone https://dagshub.com/<user_name>/<repo_name>.git
cd hello_world_git
# Create a simple file
echo "# hello_world_git" >> README.md
# Add file to Git tracking
git add README.md
git commit -m "first commit"
# Change local branch name to "main"
git branch -M main
# Push to DagsHub
git push -u origin main
After running these commands, your repo will look like this:
Now, let's learn how to version your datasets alongside your code!
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?