mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-09 05:02:22 +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
19
levels/index/new
Normal file
19
levels/index/new
Normal file
|
@ -0,0 +1,19 @@
|
|||
title = Add new files to the index
|
||||
cards = add
|
||||
|
||||
[description]
|
||||
|
||||
In the index, we can prepare what will be in the next commit.
|
||||
|
||||
Initially, the index will be empty, and all files are untracked. If you have a file, and you want to have it in the next commit, use `git add`!
|
||||
|
||||
[setup]
|
||||
|
||||
echo a > a
|
||||
echo b > b
|
||||
echo c > c
|
||||
|
||||
[win]
|
||||
|
||||
# Add all three files to the index.
|
||||
test "$(git diff --cached --name-only | wc -l)" -eq 3
|
Loading…
Add table
Add a link
Reference in a new issue