Re: Any way to ignore a change to a tracked file when committing/merging?
- From
- David Watson <dwatson@mimvista.com>
- Date
- Jun 13, 2007, 18:09 UTC
- Message-ID
- <6D50717E-7FB2-48EE-9B56-42B658ACAD10@mimvista.com>
- In-Reply-To
- <alpine.LFD.0.99.0706131349430.1697@xanadu.home>
It appears that only applies to untracked files. I am specifically interested in ignoring changes to files that are already tracked, unless I'm misunderstanding what you're suggesting. I just built the most recent git from repo.or.cz/git, and did the following:
* edit the file I want to "ignore" git-status shows this file as modified
* edit .git/config, set core.excludesfile to myexcludes, containing the name of the file I want * git add -u * git-status shows the file I edited as ready to be committed.
Dave Watson
On Jun 13, 2007, at 1:54 PM, Nicolas Pitre wrote:
Show 25 quoted lines
> On Wed, 13 Jun 2007, David Watson wrote: > >> Because git-commit -a is nice to use, especially if I really want >> to check in >> all the files, *except a particular set that is always the same*. >> Having to >> specify the files every time gets old pretty quick. >> >> If I could do this: >> >> $ git-commit -a --exclude=somefile >> >> that would be very useful. Or even, if I could set a file in >> my .git folder >> that would be an exclude list, then I could run something like >> >> $ git-commit -a --use-excludes >> >> I suppose the answer is to create the patch myself. > > Well, before that I'd suggest you have a look at the git-add man page, > especially the -u flag and the core.excludesfile config option. > > > Nicolas