Microsoft Office makes copies of open files, say when you open abc.xlsx Excel creates a file called ~$abc.xlsx, prefaced with a tilde and dollar sign.
When I open an Excel file in my git repository to look at the data, git tracks the new file as a change and I have to take care to avoid committing it. How can I use a .gitignore file to skip tracking these files?
Add a new row to your .gitignore file containing ~$*. That will ignore any files beginning with ~$, the prefix for temporary Microsoft Office files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With