2020-10-12 20:09:51 +02:00
|
|
|
title = Why Git?
|
|
|
|
|
2020-10-06 10:51:12 +02:00
|
|
|
[description]
|
|
|
|
|
2020-10-12 19:21:57 +02:00
|
|
|
(This chapter is not a complete introduction to Git yet, but it will explain some of the basic concepts to you.)
|
|
|
|
|
2020-10-06 10:51:12 +02:00
|
|
|
So you've been working on an essay about goldfish. You can look at the backup copies you made by clicking on them!
|
|
|
|
|
|
|
|
But look - something went wrong in the latest version of the file! Maybe it has been infected with a vowel-eating virus?
|
|
|
|
|
|
|
|
Make a new version (with the number 5) from the last version that's still okay, and add at least two more lines to it!
|
|
|
|
|
|
|
|
[congrats]
|
|
|
|
|
|
|
|
Good that you had that backup, huh?
|
|
|
|
|
|
|
|
But you're a bit worried that two weeks from now, you'll have hundreds of copies of your essay, and it will be hard to keep track of all of them.
|
|
|
|
|
|
|
|
And especially when working with other people, sending backup copies around doesn't seem ideal.
|
|
|
|
|
|
|
|
Let's look at another way to do this. :) Click "Next Level" as soon as you're ready!
|
|
|
|
|
|
|
|
[setup]
|
|
|
|
|
|
|
|
rm -rf .git
|
|
|
|
|
|
|
|
echo "~ Why goldfish are the best pets ~
|
|
|
|
|
|
|
|
(I still need to write this.)" >> essay_1.txt
|
|
|
|
|
|
|
|
|
|
|
|
echo "~ Why goldfish are the best pets ~
|
|
|
|
|
|
|
|
- They don't make any noise.
|
|
|
|
- They are pretty. (I should probably put this higher in the list?)" >> essay_2.txt
|
|
|
|
|
|
|
|
|
|
|
|
echo "~ Why goldfish are the best pets ~
|
|
|
|
|
|
|
|
- They are pretty.
|
|
|
|
- They don't pee on the carpet.
|
|
|
|
- They don't make any noise." >> essay_3.txt
|
|
|
|
|
|
|
|
echo "~ Why gldfsh r th bst pts ~
|
|
|
|
|
|
|
|
- Thy r prtty.
|
|
|
|
- Thy dn't p n th crpt.
|
|
|
|
- Thy dn't mk ny ns." >> essay_4.txt
|
|
|
|
|
|
|
|
[win]
|
|
|
|
|
|
|
|
test "$(cat *5.txt | wc -l )" -ge 7 && grep carpet *5.txt
|