4 ms·
Question: when looking at code on github, how do you know which holds the main guts of the code? Every time, I have to laboriously search around (I guess, mayb
by 6ren 14y ago
Question: when looking at code on github, how do you know which holds the main guts of the code? Every time, I have to laboriously search around (I guess, maybe, if you know sinatra/ruby/rails, you'll know the convention for what each top-level directory contains).
I keep thinking that the text alongside each file/directory on github are comments describing what's in them - but of course, git doesn't support that. They are just the most recent commit.
- primatology 14y agoUnless you know the project's or framework's conventions, there's always a fair bit of poking around involved. Folder names are often descriptive enough, though. "docs" is documentation, "lib" usually contains third-party libraries, "bin" contains compiled binaries, "src" often contains the code, and "assets" (often "public" for web-based projects) contains static images and stylesheets. Now in the case there's no obvious "src" folder. But you know "docs" is documentation, and "lib" and "public" probably contain third-party libraries and images, so "views" is the best place to start.
- magicseth 14y agoIf you click on the commits tab, you can see which files have had the most activity. That should at least put you in the right place so you can ignore configuration files etc...