{"thread":{"id":"42285","subject":"Pre-Process Files for Commits and Pulls","startedAt":"2016-05-11T20:45:29Z","lastAt":"2016-05-11T21:38:00Z","messageCount":2,"participants":["Brandon Teska","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"286285","messageId":"CALo8eZyX+vPMxVzeQgrhn0G+x44myvPot-EqC=DACEo3OwDwQA@mail.gmail.com","threadId":"42285","inReplyTo":null,"subject":"Pre-Process Files for Commits and Pulls","fromName":"Brandon Teska","fromEmail":"brandon.teska@gmail.com","sentAt":"2016-05-11T20:45:29Z","receivedAt":"2016-05-11T20:45:29Z","isPatch":false,"sender":{"key":"brandon.teska@gmail.com","avatar":null},"body":"Hi everyone,\n\nI have an unusual question. I'm curious if git can pre-process files\nbefore pushing them to a remote repo and then reprocess them on pulls.\nBasically, I'm trying to work collaboratively with a few colleagues on\na project using another software program. I've decoded the file we've\nbeen working on, so that we have the \"source\" that would be well\nmanaged by git. However, I need this to be accessible to laypeople so\nI need my workflow to look like this:\n\n1. Person A works on (binary) file locally\n2. Person A commits and pushes to the repo\n3. Before the push, a script deconstructs the binary file into several\ntext files\n4. Those text files are pushed\n\nSimilarly, when Person B pulls from the repo, this is what I need to happen:\n\n1. Person B pulls\n2. Before sending the pull, git calls a script that repackages the\ntext files into a \"binary\" files that the software can use.\n3. Person B can now update the file as he wishes\n\nSo, basically I am curious if git can store a different \"form\" of the\nfile(s) that what are actually worked on. Is this possible? (I'd like\nto avoid running client side scripts if at all possible, but would be\nwilling if that's a possibility.)\n\nThanks!\n\nBrandon\n"},{"id":"286292","messageId":"xmqq37pojmx3.fsf@gitster.mtv.corp.google.com","threadId":"42285","inReplyTo":"CALo8eZyX+vPMxVzeQgrhn0G+x44myvPot-EqC=DACEo3OwDwQA@mail.gmail.com","subject":"Re: Pre-Process Files for Commits and Pulls","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-05-11T21:38:00Z","receivedAt":"2016-05-11T21:38:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brandon Teska <brandon.teska@gmail.com> writes:\n\n> 1. Person A works on (binary) file locally\n> 2. Person A commits and pushes to the repo\n> 3. Before the push, a script deconstructs the binary file into several\n> text files\n> 4. Those text files are pushed\n\nA smudge/clean filter pair is how this is done, but you need to drop\n\"several text files\" from the requirement.\n"}]}