mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Rename levels to avoid numbers
This commit is contained in:
parent
d5ac67c4cc
commit
15ec7a0df4
24 changed files with 0 additions and 0 deletions
levels/commit-create
9
levels/commit-create/description
Normal file
9
levels/commit-create/description
Normal file
|
@ -0,0 +1,9 @@
|
|||
So a tree describes the state of a directory structure at a specific point in time.
|
||||
|
||||
It would be nice if we could remember when that state existed, and who authored it, right?
|
||||
|
||||
Enter: commits. They are objects that point to a tree and contain some additional metadata. You can create a commit using
|
||||
|
||||
$ git commit-tree <tree> -m "Description of your commit"
|
||||
|
||||
Make a commit from the tree in this repository!
|
1
levels/commit-create/goal
Normal file
1
levels/commit-create/goal
Normal file
|
@ -0,0 +1 @@
|
|||
git commit-tree 3185 -m 'Clever commit message'
|
6
levels/commit-create/start
Normal file
6
levels/commit-create/start
Normal file
|
@ -0,0 +1,6 @@
|
|||
touch empty_file
|
||||
git add .
|
||||
git write-tree
|
||||
|
||||
rm empty_file
|
||||
git update-index --remove empty_file
|
3
levels/commit-create/win
Normal file
3
levels/commit-create/win
Normal file
|
@ -0,0 +1,3 @@
|
|||
COMMIT_COUNT=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep commit | wc -l)
|
||||
|
||||
test "$COMMIT_COUNT" -gt 0
|
Loading…
Add table
Add a link
Reference in a new issue