{"thread":{"id":"27209","subject":"Git and Binary Files","startedAt":"2011-04-28T15:11:16Z","lastAt":"2011-04-28T15:26:29Z","messageCount":2,"participants":["ryanzec","Peter Jönsson P"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"166647","messageId":"1304003476678-6313601.post@n2.nabble.com","threadId":"27209","inReplyTo":null,"subject":"Git and Binary Files","fromName":"ryanzec","fromEmail":"basire@gmail.com","sentAt":"2011-04-28T15:11:16Z","receivedAt":"2011-04-28T15:11:16Z","isPatch":false,"sender":{"key":"basire@gmail.com","avatar":null},"body":"I am a long time user of SVN and while it has worked for me in the past, I\nalways felt like there were features I wasn't using properly. Branching is\none of those features. Most of the time when I created branches, I was\nreally creating tags because when I created branches, I never really used\nthem for merging, just more to take a snapshot of the current code. When I\ndid have to make changes to code in one branch and merge them to another, I\nalways just manually merged the files because it was usually 1 or two files\nand merge with SVN from what I hear is not a straight forward process. I\nhave recently starting using merging at work with SVN and I now really\nunderstanding why people try to avoid it in SVN. Another thing I do in SVN\nthat I fell is counter productive is I only commit when I am 100% complete\nwith a feature. It would be great to commit things in chunks instead of one\ngreat big change. I have had multiple times where I was like \"I wish I could\ngo back just a little bit in time\" but of course I have to go back to the\ninitial version which may be a week old or modify the file manually to get\nback to the state I want it at (which it was I usually do).\n\nThankfully I have been introduced to the world of DVCS, specifically git. My\nwork is in the process of porting over to it and as I have been learning it,\nI am wondering why I am still using SVN. Git fixes the above issues as well\nas also having a number of cool little features.\n\nNow while it fixes a lot of things there is one feature that concerns me\nwith trying to using it for game development projects and that is how it\nhandles binary files. In my day job, that is not a huge concern as I do web\ndevelopment and I don't deal with many binary files that need to be\nversioned. Images are the only ones and they rarely change and are not\nusually that big. Game development is a different story. Game development in\ngeneral has many binary files (images, 3d assets, sound files, etc...).\nSince git generally has a copy of the entire binary file for each change\nthat happens to it and since these assets can change quite often and\nsometimes be large in size, I have a feeling that it can make the repository\nof project become huge even with the compression that git does with git\npack/git gc.\n\nDoes anyone use git with game development? What is the workflow for binary\nassets? Do you just store them in git (if so, are they in the main\nrepository or a separate repository using submodules)? If you don't include\nbinaries in the git repository, what tool do you use to manage binary assets\nand does it work well with git?\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Git-and-Binary-Files-tp6313601p6313601.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"166649","messageId":"41F80411E3CC644A844E6BED6E472FD91AE7A83A2B@ESESSCMS0363.eemea.ericsson.se","threadId":"27209","inReplyTo":"1304003476678-6313601.post@n2.nabble.com","subject":"RE: Git and Binary Files","fromName":"Peter Jönsson P","fromEmail":"peter.p.jonsson@ericsson.com","sentAt":"2011-04-28T15:26:29Z","receivedAt":"2011-04-28T15:26:29Z","isPatch":false,"sender":{"key":"peter.p.jonsson@ericsson.com","avatar":"https://gravatar.com/avatar/7c7bf60738b19f1590a3d39e021adadad713f84adf80a7a405667fe939ef16bb?d=mp&s=160"},"body":"Hi!\n\nI don't work with game development but I work with embedded systems where one usually have at least some types of binary files. This can range from entire cross compiler suites to FPGA binaries which should be included in the resulting product. Anyway, the \"solution\" to your problem is to separate the source code from the binary data by using several different repos. This can be achieved using either the Google \"repo\" tool (used for Android platform development) or \"plain\" git sub modules [2]. There have been some dicussions on this list regarding some other approaches but I think these two are the most common ones. \n\n// Peter\n\n[1] http://google-opensource.blogspot.com/2008/11/gerrit-and-repo-android-source.html\n[2] http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html\n\n\n-----Original Message-----\nFrom: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On Behalf Of ryanzec\nSent: den 28 april 2011 17:11\nTo: git@vger.kernel.org\nSubject: Git and Binary Files\n\nI am a long time user of SVN and while it has worked for me in the past, I always felt like there were features I wasn't using properly. Branching is one of those features. Most of the time when I created branches, I was really creating tags because when I created branches, I never really used them for merging, just more to take a snapshot of the current code. When I did have to make changes to code in one branch and merge them to another, I always just manually merged the files because it was usually 1 or two files and merge with SVN from what I hear is not a straight forward process. I have recently starting using merging at work with SVN and I now really understanding why people try to avoid it in SVN. Another thing I do in SVN that I fell is counter productive is I only commit when I a\n m 100% complete with a feature. It would be great to commit things in chunks instead of one great big change. I have had multiple times where I was like \"I wish I could go back just a little bit in time\" but of course I have to go back to the initial version which may be a week old or modify the file manually to get back to the state I want it at (which it was I usually do).\n\nThankfully I have been introduced to the world of DVCS, specifically git. My work is in the process of porting over to it and as I have been learning it, I am wondering why I am still using SVN. Git fixes the above issues as well as also having a number of cool little features.\n\nNow while it fixes a lot of things there is one feature that concerns me with trying to using it for game development projects and that is how it handles binary files. In my day job, that is not a huge concern as I do web development and I don't deal with many binary files that need to be versioned. Images are the only ones and they rarely change and are not usually that big. Game development is a different story. Game development in general has many binary files (images, 3d assets, sound files, etc...).\nSince git generally has a copy of the entire binary file for each change that happens to it and since these assets can change quite often and sometimes be large in size, I have a feeling that it can make the repository of project become huge even with the compression that git does with git pack/git gc.\n\nDoes anyone use git with game development? What is the workflow for binary assets? Do you just store them in git (if so, are they in the main repository or a separate repository using submodules)? If you don't include binaries in the git repository, what tool do you use to manage binary assets and does it work well with git?\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Git-and-Binary-Files-tp6313601p6313601.html\nSent from the git mailing list archive at Nabble.com.\n--\nTo unsubscribe from this list: send the line \"unsubscribe git\" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}