git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to share files between machines?
@ 2012-05-25 19:28 J.V.
  2012-05-25 23:06 ` Neal Kreitzinger
  0 siblings, 1 reply; 2+ messages in thread
From: J.V. @ 2012-05-25 19:28 UTC (permalink / raw)
  To: git mailing list

We have a shared git repository (origin).  Everyone on the team clones 
the repo, does some work, commits locally then pushes to the shared 
repository.

I have a box where I have cloned the repo.  I have another box (test 
box) where I have also cloned the same repo.  I change/commit/push code 
on either box to the shared repo depending on the task at hand.

Now I want to do something different.  I want to create new files on my 
local box in various directories that are part of my local git rep, and 
share them only between just the two boxes.  So I need the ability to 
commit/push to another repo such that others on the repo mentioned in 
the first sentence will not be affected.

There will be various files in various sub directories, so when I pull 
on the second box, I want all the files to come down and be put in the 
same directory that they existed on my box 1 where I committed them.

Is this at all possible? Maybe by creating a bare repository on my box 1?



J.V.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to share files between machines?
  2012-05-25 19:28 how to share files between machines? J.V.
@ 2012-05-25 23:06 ` Neal Kreitzinger
  0 siblings, 0 replies; 2+ messages in thread
From: Neal Kreitzinger @ 2012-05-25 23:06 UTC (permalink / raw)
  To: J.V.; +Cc: git mailing list

On 5/25/2012 2:28 PM, J.V. wrote:
> We have a shared git repository (origin). Everyone on the team clones
> the repo, does some work, commits locally then pushes to the shared
> repository.
>
> I have a box where I have cloned the repo. I have another box (test box)
> where I have also cloned the same repo. I change/commit/push code on
> either box to the shared repo depending on the task at hand.
>
> Now I want to do something different. I want to create new files on my
> local box in various directories that are part of my local git rep, and
> share them only between just the two boxes. So I need the ability to
> commit/push to another repo such that others on the repo mentioned in
> the first sentence will not be affected.
>
> There will be various files in various sub directories, so when I pull
> on the second box, I want all the files to come down and be put in the
> same directory that they existed on my box 1 where I committed them.
>
> Is this at all possible? Maybe by creating a bare repository on my box 1?
>
There could be lots of ways to do this.  Some ideas are:

   - git-remote allows you to communicate exclusively with the box-2-repo.
   - git-branch allows you to have a branch based on origin, and then 
create another branch based on it that has the extra stuff and that is 
the branch you share with box-2-repo.  To incorporate the original 
branch you can rebase on it or merge it in.

The real question is why do you want to do this, and is the above the 
best way to accomplish it.

Less likely, you could also find that git-submodule is your friend and 
you and box-2-repo are using an extra submodule that the origin repo is 
not using.

v/r,
neal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-25 23:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 19:28 how to share files between machines? J.V.
2012-05-25 23:06 ` Neal Kreitzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).