oh-my-git/levels/index/commit
2021-01-05 12:59:48 +01:00

27 lines
566 B
Text

title = Make a commit \o/
cards = add reset checkout commit
[description]
With that, we're ready to make our first commit! It will contain the version of the files which are currently in the index.
[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