Reputation: 731
I've just started using GitHub. I've set up my public key and and have git installed on OSX. I know the commands etc. from when I studied it at university.
What I want to know: Is there any "conventional" file structure that most GitHub members use? I notice a lot of people use 'src', 'test', etc. Does anyone have more information on the recommended file structure?
At a guess I am thinking most developers use the same file structures for all their projects hence why they look similar. If that's the case what's the best file structure to use for my projects?
I don't want users to get confused by me using unconventional file structures.
Upvotes: 4
Views: 10953
Reputation: 1979
From my perspective each GitHub project (based on your question you have a repo there) should have:
.github
folder with issue/pull requests templates (example https://github.com/zold-io/zold/tree/master/.github).gitingore
to avoid accidentally committed temporal/local files.gitattributes
for custom Git repo configuration (more https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes and https://git-scm.com/docs/gitattributes).rubycop.yml
(if it's a ruby project)readme.md
Projects from the examples above:
Upvotes: 0
Reputation: 55789
There are recommended directory structures for certain project types that you'll find alot on github, e.g. Rails, gems, etc, but not for Git per se.
Rails - http://guides.rubyonrails.org/command_line.html#rails-generate
Ruby gems - http://seattlerb.rubyforge.org/hoe/
Java - http://java.sun.com/blueprints/code/projectconventions.html
C - Folder structure for a C project
Upvotes: 3
Reputation: 74202
Follow the conventions followed by the community of the particular programming language.
In Perl, we generally follow a structure like:
eg/ # example scripts
lib/ # for modules
scripts/ # scripts to use the modules
t/ # tests
CHANGES
LICENSE
README
Upvotes: 3