I was wondering if there is a way to restrict some files from ever being pushed to a git repo?
I have a file with username and password information that I want to make sure will never get pushed to my repo for obvious reasons.
I am using git for my version control. I was wondering if it is possible to have git not allow my file "passwords.txt" to be uploaded to my repo. So if I were to accidentally add, commit, and push the file it would throw an error saying something like "Cannot push passwords.txt to the repo."
Is this possible, or do I just need to be very carful when adding and committing my files?