Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it okay to upload non-code files to GitHub?

Tags:

git

github

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?

like image 697
federico-t Avatar asked Nov 25 '12 07:11

federico-t


People also ask

What should I not upload to GitHub?

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).

Can you put any file on GitHub?

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.

Are my files safe on GitHub?

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.

What kind of files can be stored in GitHub?

Github will accept any file as long as the size is within the 25 MB limit.


1 Answers

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.)

like image 143
Dietrich Epp Avatar answered Sep 20 '22 18:09

Dietrich Epp