git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Suggestions for my use case

From
RRussell <russellsteicke@gmail.com>
Date
Sep 2, 2006, 14:41 UTC
Message-ID
<c1b8b6670609020741q2d45ea3nf336611edcd452b6@mail.gmail.com>
Hello,

I've been tring git for a few private projects and have come up with a way to organise distributed development on multiple machines. I was wondering if anyone else could comment on what I've done? Here it is...

I want to be able to work on a project called proj on multiple computers, and have backups on removable media. Let's say I have computers c1 and c2, and a removable hard disk labelled disk1. I've setup the repositories in

  c1: /home/me/proj
  c2: /home/me/proj
  disk1: /media/disk1/me/proj
In c1:/home/me/proj/.git/remotes/c2
  URL: ssh://c2/home/me/proj
  Pull: refs/heads/master:refs/heads/host/c2
  Push: refs/heads/master:refs/heads/host/c1
In c1:/home/me/proj/.git/remotes/disk1
  URL: /media/disk1/me/proj
  Pull: refs/heads/master:refs/heads/disk/disk1
  Push: refs/heads/master:refs/heads/host/c1
In c2:/home/me/proj/.git/remotes/c1
  URL: ssh://c1/home/me/proj
  Pull: refs/heads/master:refs/heads/host/c1
  Push: refs/heads/master:refs/heads/host/c2
In c2:/home/me/proj/.git/remotes/disk1
  URL: /media/disk1/me/proj
  Pull: refs/heads/master:refs/heads/disk/disk1
  Push: refs/heads/master:refs/heads/host/c2
c1 has these branches:
  master
  host/c2
  disk/disk1
c2 has these branches:
  master
  host/c1
  disk/disk1
disk1 has these branches:
  master
  host/c1
  host/c2
So after doing some work at c1 and committing into master, I can
  c1$ git-push c2
  c1$ git-push disk1
Then when I sit down at c2:
  c2$ git-pull . host/c1
Or if I've forgotten to push from c1:
  c2$ git-pull c1
Or I can cart disk1 around, and
  c2$ git-pull disk1

Each repository stays on its master branch. As per the git-pull man page, no development is done on branches that I pull from.

This is working fine for me at the moment, which is single person development, straight line, no branching. When I come to branches, I think the branches will need to be added in each repository, with push and pull lines in .git/remotes/c1 etc.

Does this look reasonable? What have I missed that would make this more manageable, particularly with respect to branching?

-- 
VGER BF report: U 0.500329
Message 1 of 1 in “Suggestions for my use case”
  1. RussellSep 2, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.