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

Having Git follow symlinks

From
Peter Krefting <peter@softwolves.pp.se>
Date
Jan 28, 2014, 13:49 UTC
Message-ID
<alpine.DEB.2.02.1401281443330.17426@perkele.intern.softwolves.pp.se>
Hi!

Is there a (per-repo) setting to get Git to follow symlinks in the working directory, i.e., to not store the symlinks themselves but rather work on what they point to?

Background: I have a repository that stores a number of my dotfiles, 
shared between all my machines (Linux, OSX, Windows/CygWin, Solaris). 
It is currently a CVS repo that I wish to convert to Git since CVS is 
getting more and more scarce. However, I have the repo set up so that 
I check it out into a subdirectory of its own, and have symlinks 
(junctions on Windows) both coming into it (for files that live in ~) 
and out of it (for subdirectories of ~ that cannot be symlinks 
themselves, such as ~/.ssh, or that live elsewhere, such as under 
AppData on Windows or ~/Library on MacOS). CVS handles this by 
simply not knowing anything about symlinks, and I would like to 
get Git to do the same.

I could probably get away with junctions on Windows and directory hardlinks on OSX, but that would not work on Linux.

-- 
\\// Peter - http://www.softwolves.pp.se/
Next: Johan Herland
Message 1 of 9 in “Having Git follow symlinks”
  1. Peter KreftingJan 28, 2014
  2. Johan HerlandJan 28, 2014
  3. Peter KreftingJan 30, 2014
  4. Christian CouderJan 30, 2014
  5. Matthieu MoyJan 30, 2014
  6. Peter KreftingJan 31, 2014
  7. Matthew RuffaloJan 31, 2014
  8. Junio C HamanoJan 31, 2014
  9. Matthieu MoyJan 31, 2014

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.