git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] .gitignore: Ignore editor backup and swap files

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 16, 2014, 22:43 UTC
Message-ID
<20140116224334.GS18964@google.com>
In-Reply-To
<xmqqtxd3y43b.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> These paths that depend on your choice of the editor and other tools
> can still be managed in your personal .git/info/exclude in the
> meantime.

Or $HOME/.config/git/ignore to not have to make the same setting in every repository. :)

Maybe it would make sense to add a hint about that somewhere to user-manual.txt. Even better would be to automatically include some common exclude patterns globally without requiring any manual configuration, but that would take some care to make sure the patterns and how to disable them are documented clearly.

-- >8 --
Subject: gitignore doc: add global gitignore to synopsis

The gitignore(5) manpage already documents $XDG_CONFIG_HOME/git/ignore but it is easy to forget that it exists. Add a reminder to the synopsis.

Noticed while looking for a place to put a list of scratch filenames in the cwd used by one's editor of choice.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/gitignore.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index f971960..37c9470 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -7,7 +7,7 @@ gitignore - Specifies intentionally untracked files to ignore
 
 SYNOPSIS
 --------
-$GIT_DIR/info/exclude, .gitignore
+$HOME/.config/git/ignore, $GIT_DIR/info/exclude, .gitignore
 
 DESCRIPTION
 -----------
-- 
1.8.5.2
Previous: Alexander BerntsenNext: Duy Nguyen
Message 4 of 7 in “.gitignore: Ignore editor backup and swap files”
  1. .gitignore: Ignore editor backup and swap filesAlexander Berntsen, Jan 16, 2014
  2. Junio C HamanoJan 16, 2014
  3. Alexander BerntsenJan 16, 2014
  4. Jonathan NiederJan 16, 2014
  5. Duy NguyenJan 17, 2014
  6. Ramsay JonesJan 16, 2014
  7. David KastrupJan 17, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.