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

Re: using the same repo with different OS

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 12, 2007, 20:05 UTC
Message-ID
<Pine.LNX.4.63.0703122100550.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<906f26060703121133o6de42d66y9f3ada50149a852c@mail.gmail.com>
Hi,
On Mon, 12 Mar 2007, Stefano Spinucci wrote:
Show 30 quoted lines
> On 2/28/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> > 
> > Stefano Spinucci <virgo977virgo@gmail.com> wrote:
> > > Than I'm asking how you'd setup repos to work on some linux/windows
> > > machines, transferring data only with an USB disk.
> > 
> > Just create a bare repository on the USB stick and push/fetch to it.
> > It won't have a checkout directory or an index, the two sticking
> > points with mmap() on Windows and with a FAT32 filesystem being
> > accessed through Git by both Linux and Windows.
> 
> Needing to have my repos backupped and only on fat32 usb keys, I was
> thinking to have the following layout:
> on usb key one --> repo.linux
> on usb key two --> repo.win
> 
> Then, on repo.win, I'll do:
> # before daily work on windows
> fetch from repo.linux
> # after daily work on windows
> push to repo.linux
> 
> Otherwise, on repo.linux:
> # before nightly work on linux
> fetch from repo.windows
> # after nightly work on linux
> push to repo.windows
> 
> It's possible, or I need a third bare repository between windows and 
> linux ???
No need for a third one. You can even use alternates to save space:
$ git clone -l -s repo.linux repo.windows

When git-gc'ing, the objects will be packed, but if they are present in both repo.linux and repo.windows, the objects from repo.linux will be reused in repo.windows.

Note: USB sticks are almost as fragile as disks used to be... So, try 
avoiding writes if you can...

Ciao, Dscho

Previous: Stefano SpinucciNext: Stefano Spinucci
Message 10 of 11 in “using the same repo with different OS”
  1. Stefano SpinucciFeb 25, 2007
  2. Stefano SpinucciFeb 25, 2007
  3. Johannes SchindelinFeb 25, 2007
  4. Junio C HamanoFeb 25, 2007
  5. Johannes SchindelinFeb 25, 2007
  6. Junio C HamanoFeb 25, 2007
  7. Stefano SpinucciFeb 28, 2007
  8. Shawn O. PearceFeb 28, 2007
  9. Stefano SpinucciMar 12, 2007
  10. Johannes SchindelinMar 12, 2007
  11. Stefano SpinucciMar 17, 2007

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.