We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Storing Data

Git stores an entire snapshot of files on a per-commit level. This was a surprise to me! I always assumed each commit only stored the changes made in that commit.

Optimization

While it's true that Git stores entire snapshots, it does have some performance optimizations so that your .git directory doesn't get too unbearably large.

  • Git compresses and packs files to store them more efficiently.
  • Git deduplicates files that are the same across different commits. If a file doesn't change between commits, Git will only store it once.

Assignment

starwars.md:

- "May the Force be with you"
- "I find your lack of faith disturbing"
- "I am your father"
- "Do or do not. There is no try"
- "I've got a bad feeling about this"

dune.md:

- "May thy knife chip and shatter"
- "A Great Man Doesn't Seek To Lead. He's Called To It."
- "An Animal Caught In A Trap Will Gnaw Off Its Own Leg To Escape. What Will You Do?"
- "When Is A Gift Not A Gift?"
    • For example, C: add quotes.

Run and submit the CLI tests from the root of your repo.

Tip

You can stage each file separately:

git add quotes/starwars.md
git add quotes/dune.md

Or you can stage all the changes in your repo at once:

git add .