git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jakub Narębski" <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"David Lang" <david@lang.hm>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Is there a way to have a local version of a header file?
Date: Sat, 18 Mar 2017 19:21:10 +0100	[thread overview]
Message-ID: <35e8ef4e-9a72-28e5-6797-99ad639de591@gmail.com> (raw)
In-Reply-To: <CACBZZX7G=C84kz4n26VTnWWUTKRv1rVvms=8AvELtMSCviu1kQ@mail.gmail.com>

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


      parent reply	other threads:[~2017-03-18 18:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 14:29 Is there a way to have a local version of a header file? David Lang
2017-03-18 14:48 ` Ævar Arnfjörð Bjarmason
2017-03-18 14:58   ` David Lang
2017-03-18 17:08     ` Ævar Arnfjörð Bjarmason
2017-03-18 18:05       ` Junio C Hamano
2017-03-18 22:40         ` David Lang
2017-03-18 23:11           ` Junio C Hamano
2017-03-18 23:22             ` Samuel Lijin
2017-03-19 21:33               ` Johannes Sixt
2017-03-19  0:19             ` David Lang
2017-03-18 18:21       ` Jakub Narębski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35e8ef4e-9a72-28e5-6797-99ad639de591@gmail.com \
    --to=jnareb@gmail.com \
    --cc=avarab@gmail.com \
    --cc=david@lang.hm \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).