Is there any way to tell Git to track a file's existence, but not to track the content of the file? I would like Git to create a file if it doesn't already exist when git pull is run, but to otherwise ignore the file.
This would be highly useful for error_logs ect in a web-app I am developing.
A native way to do this (beside git-annex) is to:
.gitattribute
file a content filter driver: a smudge
script which will run automatically on checkout and will reference the script mentioned in the previous point.(image from "Customizing Git Attributes" " from the Git Book)
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