mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-07 05:02:04 +02:00
First version of an "index" chapter
This commit is contained in:
parent
21d8366dbb
commit
e754671b88
12 changed files with 216 additions and 6 deletions
levels/index
22
levels/index/reset
Normal file
22
levels/index/reset
Normal file
|
@ -0,0 +1,22 @@
|
|||
title = Resetting files in the index
|
||||
cards = add reset
|
||||
|
||||
[description]
|
||||
|
||||
If you already have changes in the index, but want to reset them, you can use `git reset`!
|
||||
|
||||
[setup]
|
||||
|
||||
echo a > a
|
||||
echo b > b
|
||||
echo c > c
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
echo x > a
|
||||
echo x > b
|
||||
git add .
|
||||
|
||||
[win]
|
||||
|
||||
# Reset all changes in files in the index!
|
||||
test "$(git diff --cached --name-only | wc -l)" -eq 0
|
Loading…
Add table
Add a link
Reference in a new issue