Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

version_code.md 1.4 KB

You have to be logged in to leave a comment. Sign In
title description
Managing Code Versions with DagsHub Learn how to manage your ML code with DagsHub

Version Code

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:

Project After Code Push

Next Steps

Now, let's learn how to version your datasets alongside your code!

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...