oh-my-git/levels/bottom-up/index-update/description

10 lines
328 B
Text
Raw Normal View History

2020-09-15 22:35:14 +02:00
Instead of removing an entry from the index and adding one with the same name, you can also directly update that entry!
Put the content you want in a file with a matching name, and then run
git update-index <file>
2020-09-15 22:35:14 +02:00
This will create a new blob, and update the hash of the entry to that blob.
Update an entry in the index!