tags:

views:

168

answers:

3

Hello, I am using git on a project, that generates lots of data-files (simulation-results). I am "forced" to version and track all those results in the same repository. (This is a hard requirement and can not be changed)

However I don't need them. We have about 50 MB for the project and 5 GB results in the repository.

Is it feasible for me to create a branch, delete all the results, check this branch out and only work on that branch?

How hard would it be (what would I have to do), to push my local changes back into the fat branch?

Is there a better solution to get rid of those 5 GB for my work?

+2  A: 

If you were to make a branch and delete the result files from the branch, then merging your branch back into master would also try to delete the results from master. A file delete is a change just like any other.

Perhaps you could use the git submodule support to manage your code changes as a submodule of the fat repository. In this way, the fat repository would appear to contain everything, but you could work on just the small code bits independently. This may take some fiddling around to work smoothly.

Greg Hewgill
Thank you for the tipp - do you have any good entry-points at hand for the submodules? I have never used them...
Mo
http://git.or.cz/gitwiki/GitSubmoduleTutorial is where I started, it contains some info and examples.
Greg Hewgill
+2  A: 

If you create a branch, and delete the unwanted files in one commit, you should be able to cherry-pick any subsequent commits back into your main branch without merging the commit that deletes the data files.

See the manual for git cherry-pick.

SpoonMeiser
I will look into it asap. Sounds like the solution, I was looking for.
Mo
Creating a submodule was, after all, the more practical solution.
Mo
A: 

Besides git cherry-pick, another alternative is to run git-revert on the file delete change just before merging.

skiphoppy