Intro to Git for scientists
A git repository is two things
- A key value store maps checksum → file
-
A tree: How these checksums correspond to versions and branches.
An even simpler workflow
edit files (Grab tub of ice cream)
Stage the changes and commit (run to cashier and pay for it)
Compare the two branches
git checkout master
git branch
* master
new_idea
cat file1.txt
My first file
Another exciting data point
git branch
git checkout new_idea
master
* new_idea
cat file1.txt
My first file
Another exciting data point
Another new line
Added a sentence in my new branch
Other things you can do
- Collaborate with your coauthors
- Use various free/paid tools including guis
- Manage everything with git