* User-wide ignore list @ 2007-02-15 10:20 Matthieu Moy 2007-02-15 10:52 ` Johannes Schindelin 2007-02-15 11:12 ` Andy Parkins 0 siblings, 2 replies; 11+ messages in thread From: Matthieu Moy @ 2007-02-15 10:20 UTC (permalink / raw) To: git Hi, Is there a way to have a per-user ignore list in git? I'd like to ignore once and for all the backup files of my editor (*~), which are not necessarily relevant to a project, but definitely relevant for me regardless of the project. Thanks, -- Matthieu ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 10:20 User-wide ignore list Matthieu Moy @ 2007-02-15 10:52 ` Johannes Schindelin 2007-02-15 11:00 ` Nguyen Thai Ngoc Duy ` (2 more replies) 2007-02-15 11:12 ` Andy Parkins 1 sibling, 3 replies; 11+ messages in thread From: Johannes Schindelin @ 2007-02-15 10:52 UTC (permalink / raw) To: Matthieu Moy; +Cc: git Hi, On Thu, 15 Feb 2007, Matthieu Moy wrote: > Is there a way to have a per-user ignore list in git? It's not really per user, but how about doing it with templates? Ciao, Dscho ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 10:52 ` Johannes Schindelin @ 2007-02-15 11:00 ` Nguyen Thai Ngoc Duy 2007-02-15 11:00 ` Matthieu Moy 2007-02-15 11:30 ` Junio C Hamano 2 siblings, 0 replies; 11+ messages in thread From: Nguyen Thai Ngoc Duy @ 2007-02-15 11:00 UTC (permalink / raw) To: Johannes Schindelin; +Cc: Matthieu Moy, git On 2/15/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > Hi, > > On Thu, 15 Feb 2007, Matthieu Moy wrote: > > > Is there a way to have a per-user ignore list in git? > > It's not really per user, but how about doing it with templates? Templates have no effect on previously created git repositories, does it? -- Duy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 10:52 ` Johannes Schindelin 2007-02-15 11:00 ` Nguyen Thai Ngoc Duy @ 2007-02-15 11:00 ` Matthieu Moy 2007-02-15 11:37 ` Johannes Schindelin 2007-02-15 11:30 ` Junio C Hamano 2 siblings, 1 reply; 11+ messages in thread From: Matthieu Moy @ 2007-02-15 11:00 UTC (permalink / raw) To: git Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > Hi, > > On Thu, 15 Feb 2007, Matthieu Moy wrote: > >> Is there a way to have a per-user ignore list in git? > > It's not really per user, but how about doing it with templates? Correct me if I'm wrong (I didn't really find a documentation for templates), but I believe this would only apply to newly created project. Then, it doesn't apply if I clone the project of someone using another editor for example, nor to my old projects if I add something to the list of things I want to ignore. -- Matthieu ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 11:00 ` Matthieu Moy @ 2007-02-15 11:37 ` Johannes Schindelin 2007-02-15 13:56 ` Nguyen Thai Ngoc Duy 0 siblings, 1 reply; 11+ messages in thread From: Johannes Schindelin @ 2007-02-15 11:37 UTC (permalink / raw) To: Matthieu Moy; +Cc: git, Nguyen Thai Ngoc Duy Hi, [Cc'ed Duy, as he raised the same concerns.] On Thu, 15 Feb 2007, Matthieu Moy wrote: > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > On Thu, 15 Feb 2007, Matthieu Moy wrote: > > > >> Is there a way to have a per-user ignore list in git? > > > > It's not really per user, but how about doing it with templates? > > Correct me if I'm wrong (I didn't really find a documentation for > templates), but I believe this would only apply to newly created > project. Yes. However, you can safely call "git init" in an _existing_ repo. It does not overwrite existing files. > Then, it doesn't apply if I clone the project of someone using another > editor for example, nor to my old projects if I add something to the > list of things I want to ignore. "git clone" implicitly calls "git init"; Therefore you get the templates, too. But you're right, if you already edited .git/info/exclude, this will not overwrite it. Of course, you could fiddle with ~/.gitconfig, or even ~/.gitignore, but I suggest that you first think about a sane syntax. Also note that this opens the door for shooting-in-the-foot; files you are certain you want ignored can show up in a cloned repo all to easy. Ciao, Dscho ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 11:37 ` Johannes Schindelin @ 2007-02-15 13:56 ` Nguyen Thai Ngoc Duy 0 siblings, 0 replies; 11+ messages in thread From: Nguyen Thai Ngoc Duy @ 2007-02-15 13:56 UTC (permalink / raw) To: Johannes Schindelin; +Cc: git On 2/15/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > Yes. However, you can safely call "git init" in an _existing_ repo. It > does not overwrite existing files. Oh.. that's enough for me :-) -- Duy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 10:52 ` Johannes Schindelin 2007-02-15 11:00 ` Nguyen Thai Ngoc Duy 2007-02-15 11:00 ` Matthieu Moy @ 2007-02-15 11:30 ` Junio C Hamano 2 siblings, 0 replies; 11+ messages in thread From: Junio C Hamano @ 2007-02-15 11:30 UTC (permalink / raw) To: Johannes Schindelin; +Cc: Matthieu Moy, git Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > Hi, > > On Thu, 15 Feb 2007, Matthieu Moy wrote: > >> Is there a way to have a per-user ignore list in git? > > It's not really per user, but how about doing it with templates? It might be an option to introduce a configuration variable that points at a file to be used in addition to $GIT_DIR/info/exclude. Then you can set that variable in ~/.gitconfig. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 10:20 User-wide ignore list Matthieu Moy 2007-02-15 10:52 ` Johannes Schindelin @ 2007-02-15 11:12 ` Andy Parkins 2007-02-15 11:59 ` Johannes Schindelin 1 sibling, 1 reply; 11+ messages in thread From: Andy Parkins @ 2007-02-15 11:12 UTC (permalink / raw) To: git; +Cc: Matthieu Moy On Thursday 2007 February 15 10:20, Matthieu Moy wrote: > Is there a way to have a per-user ignore list in git? Yep; in repository-layout.txt it says: info/exclude:: This file, by convention among Porcelains, stores the exclude pattern list. `.gitignore` is the per-directory ignore file. `git status`, `git add`, `git rm` and `git clean` look at it but the core git commands do not look at it. See also: gitlink:git-ls-files[1] `--exclude-from` and `--exclude-per-directory`. Andy -- Dr Andy Parkins, M Eng (hons), MIEE andyparkins@gmail.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 11:12 ` Andy Parkins @ 2007-02-15 11:59 ` Johannes Schindelin 2007-02-15 13:06 ` Andy Parkins 0 siblings, 1 reply; 11+ messages in thread From: Johannes Schindelin @ 2007-02-15 11:59 UTC (permalink / raw) To: Andy Parkins; +Cc: git, Matthieu Moy Hi, On Thu, 15 Feb 2007, Andy Parkins wrote: > On Thursday 2007 February 15 10:20, Matthieu Moy wrote: > > > Is there a way to have a per-user ignore list in git? > > Yep; in repository-layout.txt it says: > > info/exclude:: Nope. This is per-repo, not per-user. Hth, Dscho ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 11:59 ` Johannes Schindelin @ 2007-02-15 13:06 ` Andy Parkins 2007-02-15 15:23 ` Johannes Schindelin 0 siblings, 1 reply; 11+ messages in thread From: Andy Parkins @ 2007-02-15 13:06 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Matthieu Moy On Thursday 2007 February 15 11:59, Johannes Schindelin wrote: > > info/exclude:: > > Nope. This is per-repo, not per-user. Silly me; I forgot to write the last bit of my email :-) $ ln -sf $HOME/.git/exclude $GIT_DIR/info/exclude Do that in each of your working checkouts and voila. Andy -- Dr Andy Parkins, M Eng (hons), MIEE andyparkins@gmail.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: User-wide ignore list 2007-02-15 13:06 ` Andy Parkins @ 2007-02-15 15:23 ` Johannes Schindelin 0 siblings, 0 replies; 11+ messages in thread From: Johannes Schindelin @ 2007-02-15 15:23 UTC (permalink / raw) To: Andy Parkins; +Cc: git, Matthieu Moy Hi, On Thu, 15 Feb 2007, Andy Parkins wrote: > On Thursday 2007 February 15 11:59, Johannes Schindelin wrote: > > > > info/exclude:: > > > > Nope. This is per-repo, not per-user. > > Silly me; I forgot to write the last bit of my email :-) > > $ ln -sf $HOME/.git/exclude $GIT_DIR/info/exclude > > Do that in each of your working checkouts and voila. ... and next time you edit .git/info/exclude, be very surprised that other repos have the change, too. Ciao, Dscho ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-02-15 15:23 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-02-15 10:20 User-wide ignore list Matthieu Moy 2007-02-15 10:52 ` Johannes Schindelin 2007-02-15 11:00 ` Nguyen Thai Ngoc Duy 2007-02-15 11:00 ` Matthieu Moy 2007-02-15 11:37 ` Johannes Schindelin 2007-02-15 13:56 ` Nguyen Thai Ngoc Duy 2007-02-15 11:30 ` Junio C Hamano 2007-02-15 11:12 ` Andy Parkins 2007-02-15 11:59 ` Johannes Schindelin 2007-02-15 13:06 ` Andy Parkins 2007-02-15 15:23 ` Johannes Schindelin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox