oh-my-git/levels/unused/commit
2021-01-11 19:16:35 +01:00

28 lines
502 B
Plaintext

title = Make a commit \o/
cards = add reset checkout commit
[description]
For practice, make a commit where all files contain an "x"!
[setup]
echo a > a
echo x > b
echo x > c
git add .
git commit -m "Initial commit"
echo x > a
echo b > b
git add b
echo c > c
[win]
# File a contains "x" in the last main commit.
test "$(git show main:a)" = x
# File b contains "x" in the last main commit.
test "$(git show main:b)" = x
# File c contains "x" in the last main commit.
test "$(git show main:c)" = x