What files of my project should I put in repo
I’m using Dev-C++ IDE for C programming.
I want to put my project in Github but I’d like to know which type of files should I put there. I mean, the project folder has .o, .layout, .dev (dev-C++ project file), .exe along with source files .c and .h .mkv (make file)
- How to list all files in a remote SVN repository?
- How do I make a Git commit in the past?
- How to structure a repository that consists of several libraries and applications
- prevent `git` from pushing commits with given commit message
- Push a tag to a remote repository using Git?
- Bitbucket branch management
so, which files I should put. If I shouldn’t put those file, how should I manage them. I mean my .git file is stored there.. so, when ever there are some files.. it keeps showing me them which are not updated/pushed..
3 Solutions collect form web for “What files of my project should I put in repo”
The three big rules of thumb to follow with all source control are:
If it’s a generated asset, it doesn’t go in source control. Otherwise, you’re wasting space and needlessly duplicating effort, and you run the risk of stale data. This includes things like object files, compiled project binaries, et cetera.
If it contains configuration, keys, passwords, environment variables, etc. that are specific to your machine, it doesn’t go in source control. You need to remove anything that’s specific to you (references to file paths that won’t exist on someone else’s machine, etc.).
If it’s a binary dependency that you don’t control (e.g. you depend on glib or NUnit), it also shouldn’t go in source control. But you may have no choice if you can’t or don’t use a package/dependency manager. Ideally it’s better if that never lives in your code and you simply have configuration somewhere that says “I depend on NUnit v.2.3.5”.
There are exceptions to every rule, of course, but these are some good starting points.
Note that this isn’t git-specific; git doesn’t care about what files you want to put into source control, and it will let you do anything. You’d probably get the same answer if you were using hg, Subversion, or anything else similar.
Usually we put Sourcecode and resources in the repository. OBJ- and BIN-Files should not be put there as they only produce conflicts.
Simple Rule: Don’t put files in the repository which are generated dynamicly by your IDE
or in other words:
When you throw away your computer and buy a new one: Which files do you need to continue work?
We usually put everything into the repository that you need to build the project. So the code files, project files, scripts, resources.
We do NOT put binaries into the repository that can be build by compiling the code. However we put third party binaries into the repository.
All other files, like obj files do not belong there.