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
Pierre Habouzit <madcoder@debian.org>
Date
Jun 13, 2007, 16:33 UTC
Message-ID
<20070613163312.GJ5311@artemis.intersec.eu>
In-Reply-To
<A30E217A-084E-4019-949F-5918EAA6368E@mimvista.com>
On Wed, Jun 13, 2007 at 11:47:33AM -0400, David Watson wrote:
Show 17 quoted lines
> 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 the repository. The 
> only problem is, the file I've modified is already under version control, 
> so .gitignore doesn't do anything.
> 
> Now, I can commit it, so it will stop bugging me, but then when I push 
> out it will include that change, unless I back it out. This is a change 
> that I don't want propagated anywhere else, because it's specific to my 
> machine or development sandbox.
> 
> Is there any way to do this? I'd really love to use git-commit -a in this 
> situation, and I could hack up a script to undo my change, run git-commit 
> -a, and reapply the change, but makes me a bit squirmy. If I could put 
> something in a .git config file to say "commit 237ab should not be 
> propagated under any circumstances", that would be fantastic.
  please read the thread [ pull into dirty working tree ] that is just
about this, and like errr 2 threads before yours.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: David WatsonNext: Nicolas Pitre
Message 2 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.