oh-my-git/levels/index/checkout
blinry 97a7c40ba3 Symbols for index-modifying cards, remove index/mv level for now
Plus better descriptions for pull/push/fetch.
2021-01-14 11:26:21 +01:00

25 lines
551 B
Text

title = Checking out files from the index
cards = add reset-file checkout-file commit
[description]
So you've made changes to your files, but you decide that you don't want to keep them! You can use `git checkout` for that!
What happens if you have already update the index, like in file c? You have to reset the index first!
[setup]
echo a > a
echo b > b
echo c > c
git add .
git commit -m "Initial commit"
echo x > a
echo x > b
echo x > c
git add c
[win]
# Remove all changes in your local files!
test "$(git diff --name-only | wc -l)" -eq 0