Skip to content

Commit 97f4d8c

Browse files
committed
Add '.swp' as temp Vim extension in example
Although Vim uses files that end with '~', usually 'git status' shows '.*.swp' file that is present during editing a file (~ file is present only at saving time)
1 parent 9af562d commit 97f4d8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

book/08-customizing-git/sections/config.asc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,15 @@ You can put patterns in your project's `.gitignore` file to have Git not see the
145145

146146
But sometimes you want to ignore certain files for all repositories that you work with.
147147
If your computer is running Mac OS X, you're probably familiar with `.DS_Store` files.
148-
If your preferred editor is Emacs or Vim, you know about files that end with a `~`.
148+
If your preferred editor is Emacs or Vim, you know about files that end with a `~` or `.swp`.
149149

150150
This setting lets you write a kind of global `.gitignore` file.
151151
If you create a `~/.gitignore_global` file with these contents:
152152

153153
[source,ini]
154154
----
155155
*~
156+
.*.swp
156157
.DS_Store
157158
----
158159

0 commit comments

Comments
 (0)