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-parents
5
levels/commit-parents/description
Normal file
5
levels/commit-parents/description
Normal file
|
@ -0,0 +1,5 @@
|
|||
When using the commit-tree command, you can optionally specify a parent:
|
||||
|
||||
$ git commit-tree <tree> -m "Description" -p <parent commit>
|
||||
|
||||
Can you make a string of three commits? We placed an empty tree in your repo to get you started.
|
3
levels/commit-parents/goal
Normal file
3
levels/commit-parents/goal
Normal file
|
@ -0,0 +1,3 @@
|
|||
FIRST_COMMIT=$(git commit-tree 4b82 -m 'First commit :O')
|
||||
SECOND_COMMIT=$(git commit-tree 4b82 -p $FIRST_COMMIT -m 'Second commit :D')
|
||||
THIRD_COMMIT=$(git commit-tree 4b82 -p $SECOND_COMMIT -m 'Third commit \o/')
|
1
levels/commit-parents/start
Normal file
1
levels/commit-parents/start
Normal file
|
@ -0,0 +1 @@
|
|||
git write-tree
|
10
levels/commit-parents/win
Normal file
10
levels/commit-parents/win
Normal file
|
@ -0,0 +1,10 @@
|
|||
COMMITS=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep commit | cut -f1 -d" ")
|
||||
|
||||
for COMMIT in $COMMITS; do
|
||||
echo a commit named $COMMIT
|
||||
if [ $(git rev-list $COMMIT | wc -l) -ge 3 ]; then
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue