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

Re: How do you add an external directory to repository?

From
NSNicolas Sebrecht <nicolas.s.dev@gmx.fr>
Date
Mar 7, 2010, 21:36 UTC
Message-ID
<20100307213624.GA12937@vidovic>
In-Reply-To
<1267992229319-4691734.post@n2.nabble.com>
The 07/03/10, slipstream180 wrote:
> I understand that I can add a symbolic link to /home/some/directory, but I
> believe that only track the link. How do I track all files under the
> directory as well?

I think you're looking for the bind option of mount. This is what I use to track all my configuration files in one "conf" repository.

Here is an extract of how my fstab looks like:
  /home/nicolas/.zsh /home/nicolas/dev/conf/zsh				auto	bind,user	0 0 
  /home/nicolas/.vim /home/nicolas/dev/conf/vim				auto	bind,user	0 0 
  /home/nicolas/.mutt /home/nicolas/dev/conf/mutt				auto	bind,user	0 0 
  /home/nicolas/.screen /home/nicolas/dev/conf/screen			auto	bind,user	0 0 
  /home/nicolas/.offlineimapconf/ /home/nicolas/dev/conf/offlineimap	auto	bind,user	0 0 

I also use a symbolic link ~/.zshrc to .zsh/zshrc to track it too. This is very useful because one logical change may affect configuration files from various programs (e.g. have a new mailbox concerns mutt, offlineimap, imapfilter, and some other scripts of my own).

Also, I use this trick for web projects:
  /home/nicolas/dev/wsb /var/www/localhost/htdocs/wsb			auto	bind,user	0 0
  
-- 
Nicolas Sebrecht
Previous: Fredrik Gustafsson
Message 3 of 3 in “How do you add an external directory to repository?”
  1. slipstream180Mar 7, 2010
  2. Fredrik GustafssonMar 7, 2010
  3. Nicolas SebrechtMar 7, 2010

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.