Rename chapters into "internals" and "intro"

This commit is contained in:
Sebastian Morr 2020-10-01 15:03:02 +02:00
parent 70fe577788
commit f3ff5c5147
97 changed files with 0 additions and 0 deletions
levels/internals/index-update

View file

@ -0,0 +1,9 @@
Instead of removing an entry from the index and adding one with the same name, you can also directly update that entry!
Put the content you want in a file with a matching name, and then run
git update-index <file>
This will create a new blob, and update the hash of the entry to that blob.
Update an entry in the index!

View file

@ -0,0 +1,2 @@
echo "new content" > file1
git update-index file1

View file

@ -0,0 +1,4 @@
echo "file 1" > file1
echo "file 2" > file2
echo "file 3" > file3
git add .

View file

@ -0,0 +1,2 @@
# This is not really a good test for the winning condition...
test "$(git ls-files -s | git hash-object --stdin)" != "10c4b28623e7e44e09f5a596450a50ab7ac31fbe" -a "$(git ls-files | wc -l)" -eq 3