{"thread":{"id":"30621","subject":"how to share files between machines?","startedAt":"2012-05-25T19:28:09Z","lastAt":"2012-05-25T23:06:45Z","messageCount":2,"participants":["J.V.","Neal Kreitzinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"192195","messageId":"4FBFDD49.2000801@gmail.com","threadId":"30621","inReplyTo":null,"subject":"how to share files between machines?","fromName":"J.V.","fromEmail":"jvsrvcs@gmail.com","sentAt":"2012-05-25T19:28:09Z","receivedAt":"2012-05-25T19:28:09Z","isPatch":false,"sender":{"key":"jvsrvcs@gmail.com","avatar":null},"body":"We have a shared git repository (origin).  Everyone on the team clones \nthe repo, does some work, commits locally then pushes to the shared \nrepository.\n\nI have a box where I have cloned the repo.  I have another box (test \nbox) where I have also cloned the same repo.  I change/commit/push code \non either box to the shared repo depending on the task at hand.\n\nNow I want to do something different.  I want to create new files on my \nlocal box in various directories that are part of my local git rep, and \nshare them only between just the two boxes.  So I need the ability to \ncommit/push to another repo such that others on the repo mentioned in \nthe first sentence will not be affected.\n\nThere will be various files in various sub directories, so when I pull \non the second box, I want all the files to come down and be put in the \nsame directory that they existed on my box 1 where I committed them.\n\nIs this at all possible? Maybe by creating a bare repository on my box 1?\n\n\n\nJ.V.\n"},{"id":"192214","messageId":"4FC01085.30709@gmail.com","threadId":"30621","inReplyTo":"4FBFDD49.2000801@gmail.com","subject":"Re: how to share files between machines?","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-05-25T23:06:45Z","receivedAt":"2012-05-25T23:06:45Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 5/25/2012 2:28 PM, J.V. wrote:\n> We have a shared git repository (origin). Everyone on the team clones\n> the repo, does some work, commits locally then pushes to the shared\n> repository.\n>\n> I have a box where I have cloned the repo. I have another box (test box)\n> where I have also cloned the same repo. I change/commit/push code on\n> either box to the shared repo depending on the task at hand.\n>\n> Now I want to do something different. I want to create new files on my\n> local box in various directories that are part of my local git rep, and\n> share them only between just the two boxes. So I need the ability to\n> commit/push to another repo such that others on the repo mentioned in\n> the first sentence will not be affected.\n>\n> There will be various files in various sub directories, so when I pull\n> on the second box, I want all the files to come down and be put in the\n> same directory that they existed on my box 1 where I committed them.\n>\n> Is this at all possible? Maybe by creating a bare repository on my box 1?\n>\nThere could be lots of ways to do this.  Some ideas are:\n\n   - git-remote allows you to communicate exclusively with the box-2-repo.\n   - git-branch allows you to have a branch based on origin, and then \ncreate another branch based on it that has the extra stuff and that is \nthe branch you share with box-2-repo.  To incorporate the original \nbranch you can rebase on it or merge it in.\n\nThe real question is why do you want to do this, and is the above the \nbest way to accomplish it.\n\nLess likely, you could also find that git-submodule is your friend and \nyou and box-2-repo are using an extra submodule that the origin repo is \nnot using.\n\nv/r,\nneal\n"}]}