mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Reorder levels and chapters into a better sequence
This commit is contained in:
parent
5c1f1ce722
commit
c99a35d54f
40 changed files with 128 additions and 288 deletions
levels/time-machine
|
@ -1,23 +0,0 @@
|
|||
title = One step after another
|
||||
cards = checkout commit reset-hard add
|
||||
|
||||
[description]
|
||||
|
||||
Sometimes, you might want to record the order in which things changed, instead of making a single commit.
|
||||
|
||||
What happened here? Make two commits from the changes (using the "add" card), in an order that makes sense!
|
||||
|
||||
[setup]
|
||||
|
||||
echo something > file1
|
||||
echo something else > file2
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
|
||||
echo this should happen first >> file1
|
||||
echo and this should happen after that >> file2
|
||||
|
||||
[win]
|
||||
|
||||
test "$(git diff-tree --no-commit-id --name-status -r main)" = "M file2" &&
|
||||
test "$(git diff-tree --no-commit-id --name-status -r main^)" = "M file1"
|
Loading…
Add table
Add a link
Reference in a new issue