From: Jakub Narębski Date: Sat, 18 Mar 2017 18:21:10 GMT Subject: Re: Is there a way to have a local version of a header file? Message-ID: <35e8ef4e-9a72-28e5-6797-99ad639de591@gmail.com> In-Reply-To: W dniu 18.03.2017 o 18:08, Ævar Arnfjörð Bjarmason pisze: > There might be some way I haven't thought of, in particular maybe you > can use gitattributes to define a custom diff/merge driver that always > reports no changes, or some ways to (ab)use the index to make git > ignore any changes to the file. There is `git update-index --skip-worktree` (originally meant for sparse checkout), which you can use to kind of ignore changes to tracked file, in a safe way (though sometimes annoying, when it prevents stashing changes). There is also an existing solution of a hook that prevents commiting files with passwords in them; I forgot the name... HTH, -- Jakub Narębski