mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-07 05:02:04 +02:00
More polish, hide unfinished chapters/levels
This commit is contained in:
parent
be45b82e41
commit
5df4932ad5
19 changed files with 48 additions and 55 deletions
levels/branches
|
@ -39,7 +39,7 @@ git checkout leap^^
|
|||
|
||||
[win]
|
||||
|
||||
# Find the bad branches and delete them. Keep the best one.
|
||||
# Find the bad branches and delete them. Keep only the best one.
|
||||
test "$(git show-ref --heads | cut -f2 -d' ')" = "$(echo refs/heads/leap)"
|
||||
|
||||
[congrats]
|
||||
|
|
|
@ -7,7 +7,7 @@ The yellow boxes are frozen points in time, we call them "commits"! You can trav
|
|||
|
||||
The grey panel below shows your current environment - click on an object to inspect or modify it!
|
||||
|
||||
Can you find out what happened here? Then, while on the latest commit, fix the problem, and make a new commit!
|
||||
Can you find out what happened here? Then, while on the latest commit, edit the files to fix the problem, and make a new commit!
|
||||
|
||||
[setup]
|
||||
|
||||
|
|
|
@ -7,9 +7,7 @@ Note that there are two options to "travel to the end of a timeline":
|
|||
|
||||
First, you can directly travel to the commit, like we've done it before.
|
||||
|
||||
And second, you can travel to the branch label. In this case, when you make a new commit, the branch will grow with you, and still point at the end of the timeline, which is usually what we want!
|
||||
|
||||
Let's try both of these!
|
||||
And second, you can travel to the branch label. In this case, when you make a new commit, the branch will grow with you, and still point at the end of the timeline!
|
||||
|
||||
[setup]
|
||||
|
||||
|
@ -33,7 +31,7 @@ git branch -D main
|
|||
|
||||
[win]
|
||||
|
||||
# Travel directly to the last commit of the birthday timeline, make a change to 'you', and make a commit
|
||||
# Travel directly to the last yellow commit of the birthday timeline, make a change to 'you', and make a commit
|
||||
for commit in $(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep 'commit$' | cut -f1 -d' '); do
|
||||
if test $(git rev-parse $commit^) = $(git rev-parse birthday); then
|
||||
return 0
|
||||
|
@ -41,5 +39,5 @@ for commit in $(git cat-file --batch-check='%(objectname) %(objecttype)' --batch
|
|||
done
|
||||
return 1
|
||||
|
||||
# Travel to the 'concert' branch, make a change to 'you', and a commit.
|
||||
# Travel to the blue 'concert' branch, make a change to 'you', and a commit.
|
||||
git show concert^ | grep "Go to the concert"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue