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

Re: tracking file locally without pushing it to remote

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jul 23, 2011, 12:35 UTC
Message-ID
<CACsJy8AaDj3QV-unj80cY4x18tHRDAr0hdgtiRuCs6SCYP33ng@mail.gmail.com>
In-Reply-To
<CACsJy8BZSWaaNPjQYKXmTHvJ5vbNXBfNCtV78DUJVDuPqtp1Hg@mail.gmail.com>
On Sat, Jul 23, 2011 at 7:27 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> Manage the configuration files in a different repository (but with the
> same working tree). Git does not support sharing worktree this way, so
> it's a bit inconvenient.

And if you still want to manage config template files with the same name in the main repository, to be pushed to a remote one. Set assume-unchanged bit (see update-index man page) on those files in main repo, so you won't see their changes against the templates and "git commit -a" won't commit them. To be on the safe side, add a post-commit hook that disallows committing any changes to config files.

Assume unchanged bits are not persistent (ie. you will need to set it after branch switching, reset index...), but if this way works well, maybe we can add a pattern file to automatically set it.

-- 
Duy
Previous: Nguyen Thai Ngoc Duy
Message 3 of 3 in “tracking file locally without pushing it to remote”
  1. neubyrJul 22, 2011
  2. Nguyen Thai Ngoc DuyJul 23, 2011
  3. Nguyen Thai Ngoc DuyJul 23, 2011

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.