Member-only story
Beginners Notes on Git Basics (1)
Resource: Learngitbranching.js.org
2 min readFeb 21, 2022
It’s imperative for any and all developers, data scientists and other coders/developers to learn version control systems. Check out this amazing resource, learngitbranching.js.org, on a very overlooked skill. I’ve written up some essential notes using this resource for easy access and reference.
Basic definitions:
GIT COMMIT — records a snapshot of all the tracked files in your directory
- very lightweight; compressed as a set of changes (”delta”) from one version of the repo to the next
- E.G. git commit
GIT BRANCH — pointers to a specific commit
- very lightweight; no storage overhead with making branches
- E.G. git branch newImage
GIT CHECKOUT — navigate between branches created by git branch
- E.G. git checkout newImage
GIT SWITCH — new in Git version 2.23 to replace git checkout
- E.G. git switch newImage
GIT MERGE — combines the work of two different branches together
- creates a special commit that has two unique parents. Includes all work from parent 1 and parent 2 and the set of all their…