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

GIT: ignoring changes in tracked files and bug report

From
Sérgio Basto <sergio@serjux.com>
Date
Dec 4, 2014, 22:42 UTC
Message-ID
<1417732931.20814.16.camel@segulix>

Hi, I'm trying find a solution where I can change file in a devel environment , and not commit it into git .

git update-index --assume-unchanged <file> 
is one solution , not the best solution but one solution. 
I add 2 files that I want ignore on commits 

git update-index --assume-unchanged configurations/local.defs git update-index --assume-unchanged processor/default.defs

git diff -a is clean git diff . is clean

git commit -a nothing added to commit but git commit . # Changes to be committed: # modified: configurations/local.defs # modified: processor/default.defs

this is a bug ? 

Anyway what is best way to deal with some files where we want change locally and not commit in git . The solution of have one environment variable that says if we are in devel or in production , and system read the variable and choose the files to read can't be applied in my case, and is a no solution , is save a variable outside of source code which I can't.

Thanks,
-- 
Sérgio M. B.
Next: Sérgio Basto
Message 1 of 19 in “GIT: ignoring changes in tracked files and bug report”
  1. Sérgio BastoDec 4, 2014
  2. bug report on update-index --assume-unchangedSérgio Basto, Dec 5, 2014
  3. Johannes SixtDec 5, 2014
  4. Duy NguyenDec 5, 2014
  5. Sérgio BastoDec 5, 2014
  6. Junio C HamanoDec 5, 2014
  7. Philip OakleyDec 5, 2014
  8. Junio C HamanoDec 5, 2014
  9. Philip OakleyDec 5, 2014
  10. Andreas SchwabDec 5, 2014
  11. Sérgio BastoDec 6, 2014
  12. Philip OakleyDec 6, 2014
  13. Junio C HamanoDec 5, 2014
  14. Sérgio BastoDec 5, 2014
  15. Junio C HamanoDec 5, 2014
  16. Junio C HamanoDec 5, 2014
  17. commit: ignore assume-unchanged files in "commmit <file>" modeNguyễn Thái Ngọc Duy, Dec 5, 2014
  18. Sérgio BastoDec 9, 2014
  19. Philip OakleyDec 11, 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.