-1

I am a noob in GitHub and open source social programming. My GitHub account is less than a month old. To experiment with stuff, I would like to host chunks of code blah blah blah
tldr

ok, so here's the thing 1. For hosting loose chunks of code that don't belong to a particular project, is there any convention? Like, do I create a new repo for ALL those source codes? Or should I create a repo for C++ works, and another for Java and so on? If a small command line app has more than one source file (i.e. asdf.h asdf.cpp and zxcv.cpp) , should I create a whole new separate repo for it?

2. For hosting organized personal or team projects, how should I do it? Do I just move my entire project file created by my favourite IDE? Or do I just host the source files and resource files?

After intensive googling and looking at random people's repositories, I'm still super confused. Some precise answers to my questions would be nice. Thank you.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lastly, please do list any other formal, unwritten, popular and/or counter-culture convention you know of.

Noobification
  • 319
  • 1
  • 14

1 Answers1

1

For loose chunks of code, perhaps something like Github Gist is what you want? I have not used it myself, but I have seen other people us it, and I think it can be pretty much be summed up as Pastebin with version control, and it has support for more than one source file. https://gist.github.com/

I do not know an absolute answer to your second question, but I usually include my Visual Studio project files as well my source files to make things easier for me. I could always include a makefile later on if I would want to make things easier for Linux user.

Some repos, e.g. BulletPhysics (https://github.com/bulletphysics/bullet3), use CMake which is an intermediate format that can output project files to a number of build environments (Visual Studio, make, Xcode) although I have not used it much myself.

The Doom 3 source code appears to host their Visual Studio project files as well as source files. It should be cross platform, so perhaps there is another build system hidden in there as well, but I leave that to someone else to find. https://github.com/id-Software/DOOM-3-BFG

Adelost
  • 2,343
  • 2
  • 23
  • 28