mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +01:00
30 lines
492 B
Text
30 lines
492 B
Text
|
[description]
|
||
|
|
||
|
To remove an entry from the index, use a command like this:
|
||
|
|
||
|
git update-index --force-remove <file>
|
||
|
|
||
|
Remove all entries from the index!
|
||
|
|
||
|
[setup]
|
||
|
|
||
|
echo "file 1" > file1
|
||
|
echo "file 2" > file2
|
||
|
echo "file 3" > file3
|
||
|
git add .
|
||
|
|
||
|
[setup goal]
|
||
|
|
||
|
echo "file 1" > file1
|
||
|
echo "file 2" > file2
|
||
|
echo "file 3" > file3
|
||
|
git add .
|
||
|
|
||
|
git update-index --force-remove file1
|
||
|
git update-index --force-remove file2
|
||
|
git update-index --force-remove file3
|
||
|
|
||
|
[win]
|
||
|
|
||
|
test "$(git ls-files | wc -l)" -eq 0
|