I’m going to upload a -mainly PHP- project of mine to GitHub, but I’m unsure about uploading all the ‘non-code’ files like CSS, .htaccess, HTML, images that I use for the website design, etc. and even code files that aren’t in PHP (e.g. JavaScript).
Should I upload everything or only upload the PHP files if I specified that my repo would contain a PHP project?
Upload everything.
I don’t know where you got the idea that revision control is only for code.
Upload everything. Except passwords.
Clarification: For each language and toolset, you’ll develop a list of files that don’t belong in the repository. For example, you want to keep
*.ofiles out of your C project, and.*.swpfiles out of any project (they’re vim scratch files). But it is always easier to delete a file you accidentally added than it is to add a file you forgot to add. (Deleting a file with sensitive information such as passwords is a different matter, since you need to scrub the file from history as well.)