Learn Git Basics for your ML Project

 

Get started with Git and emulate the style of working from real software and machine learning engineers by using version control systems.

… tinkering in Jupyter notebooks doesn’t seem to be the right choice anymore. — Yves Boutellier

I wanted to emulate the style of working of a machine learning engineer and that’s why I decided to learn the basics on version control with Git and apply it to my projects.

Why Git?

1. Git basics

How does Git think about files?

Please remember three states

hand-drawn by author

Basic Git workflow

Exercise 1 - Practice Git Basics

1.1 Creating a new project

$ cd /Users/user/my_project (MacOs or Linux)
$ cd C:/Users/user/my_project (Windows)
$ git init

1.2 Cloning already existing project

$ git clone <url>

1.3 Stage and Commit

$ git add HelloWorld.py
$ git commit -m 'This message describes what changes I made'
Photo by Yogendra Singh on Unsplash

2. Remote basics

Exercise 2 - Create Remote Repository

git remote add <remoteName> <url>
git remote add origin https://github.com/myusername/ourproject
$ git push <remoteName> <localName>
$ git add HelloWorld.py
$ git commit -m 'This message describes what changes I made'
$ git push origin main

3. Branching

Summary

Comments

Popular posts from this blog

Flutter for Single-Page Scrollable Websites with Navigator 2.0

A Data Science Portfolio is More Valuable than a Resume

Better File Storage in Oracle Cloud