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?
Broadly speaking, you should not upload on github following: any content which does not legally belong to you, and which has no some open source license. content which could be generated (e.g. object files).
You can upload an existing file to a repository on GitHub.com using the command line. Tip: You can also add an existing file to a repository from the GitHub website. This procedure assumes you've already: Created a repository on GitHub, or have an existing repository owned by someone else you'd like to contribute to.
GitHub has pretty secure end-to-end transmission, and you can check the integrity of the repo with checksums to virtually eliminate the man-in-the-middle stuff.
Github will accept any file as long as the size is within the 25 MB limit.
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 *.o
files out of your C project, and .*.swp
files 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.)
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