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

Re: Any way to ignore a change to a tracked file when committing/merging?

From
APAndy Parkins <andyparkins@gmail.com>
Date
Jun 13, 2007, 19:34 UTC
Message-ID
<200706132034.29934.andyparkins@gmail.com>
In-Reply-To
<A30E217A-084E-4019-949F-5918EAA6368E@mimvista.com>
On Wednesday 2007, June 13, David Watson wrote:
> I've got a problem, or maybe annoyance is more the proper term, that
> I haven't seen solved by any SCM system (at least not to my
> knowledge). Basically, I may make some changes, e.g. to a Makefile or
> somesuch, that I want to ignore when looking at what's changed from

So you want to tell git to track a file and then have it not track changes to that file? Sounds crazy to me. Don't put files in the repository that you don't want tracking.

What you want is an out-of-tree file for that sort of thing. Why can't you just do

#!/usr/bin/make -include Makefile.local

Rather than messing around with not tracking tracked files?

git does exactly that in it's own build process with a config.mak file, which lets you specify, say, an install directory that is obviously only valid for you.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Robin RosenbergNext: Junio C Hamano
Message 9 of 10 in “Any way to ignore a change to a tracked file when committing/merging?”
  1. David WatsonJun 13, 2007
  2. Pierre HabouzitJun 13, 2007
  3. Nicolas PitreJun 13, 2007
  4. David WatsonJun 13, 2007
  5. Nicolas PitreJun 13, 2007
  6. David WatsonJun 13, 2007
  7. Nicolas PitreJun 13, 2007
  8. Robin RosenbergJun 13, 2007
  9. Andy ParkinsJun 13, 2007
  10. Junio C HamanoJun 13, 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.