On Thu, Sep 22, 2016 at 09:19:22AM -0500, Timur Tabi wrote:
> I have the following .gitignore file in patch arm/arm64/boot/dts:
> *.dtb
> qcom
> qcom.orig
> When I do a git status, I see this:
>     modified:   .gitignore
>     modified:   qcom/Makefile
> All of the other files in arm/arm64/boot/dts/qcom are being ignored,
> as request.  However, the file "Makefile" is not being ignored.  Why?
> What's so special about "Makefile" that git refuses to ignore it?

There is nothing special about the Makefile, except that it's tracked.
Git never ignores tracked files (almost a paradox).

You can untrack the file by doing git rm --cached <file>, which new
commits won't have this file.

If your goal is to ignore local changes to a tracked file, then the
advise is to reconsider your plan. 

Often people advise tricks like `git update-index --assume-unchanges
<file>`, but this does not work as expected. It's merely a promise to
git that this file does not change (and hence, git will not check if
this file has changed when doing git status), but command that try to
change this file will abort saying that the file has changed.

Hope this helps,


Reply via email to