I often find myself puzzled with such a questioning. I need to version my projects for two reasons:
- publish source code with its whole history so that people will be able to get into it, explore it and make use of it.
- archive my project with its whole history so that I will be able to revert, fork again etc.
There are essentially two types of files in my projects:
- essential files, raw-source-core,
src/*,README.md,configure.ac, etc. I need them to be versioned for people. - files to help me working with the raw-source-core, like
customCheckNBuildScripts/*,favoriteIDEConfiguration/*,absolutePaths/*,shortcuts/*,hooksILike/*etc. I need them to be versioned for me.
Which workflow would help me deal with such a conflict?
.gitignore provides a wonderful way of filtering between source files and build files. But I wish there would be two versions of it. In my ideal world, it would contain:
# RAW-SOURCE-CORE versioning part # Dedicated to remote github [email protected]:user/myPublicRepo.git * !src/ !README.md !configure.ac # PERSONAL-USE-OF-THIS-SOURCE versioning part # Dedicated to remote personal /media/user/flashdrive/myPrivateRepo * !src/ !README.md !configure.ac !customCheckNBuildScripts/ !favoriteIDEConfiguration/ !absolutePaths/ !shortcuts/ !hooksILike/ When I would push to github, only the first part would be used and get there.
When I would pull from github, I would only get the first category of files and the first part of .gitignore.
When I would push to personal, the second part would be used.
When I would pull from personal, I would get all my files.
Does this kind of hybrid versioning exist?
.gitignorewill be put on the public repo. This is not a big deal but I feel like it is the sign that this solution is still a workaround :) Well, it is an interesting workaround..