github/gitignore · Global/Linux.gitignore

Linux .gitignore Template Explained

Why Linux.gitignore ignores editor backups (*~), FUSE and NFS temporary files, KDE .directory, Trash folders and nohup.out.

Open in generator Open with Vim, JetBrains, VisualStudioCode, Go

Linux.gitignore is a short 6-line template that deals only with by-products of the Linux desktop and file systems. It is also the kind of template that fits well in a personal global gitignore.

Each rule targets files that appear only in specific situations. For example, .nfs* appears only on NFS mounts and .fuse_hidden* only on FUSE file systems.

Rules explained

PatternWhat it ignores and why
*~Editor backupsfilename~ backups that Emacs, gedit, nano and others leave when saving. It ignores every file whose name ends with a tilde.
.fuse_hidden*.nfs*FUSE and NFS temporary filesFiles the file system renames to postpone actual deletion when an open file is deleted. They disappear when the process closes the file.
.directoryKDE folder settingsA file in which the KDE Dolphin file manager stores folder view settings.
.Trash-*TrashPer-user Trash folders (.Trash-1000) created when files are deleted from removable media or another partition.
nohup.outBackground run logsThe file where output accumulates by default when a command is run with nohup.

Practical notes

Original template

Linux.gitignore6 rules
*~# temporary files which can be created if a process still has a handle open of a deleted file.fuse_hidden*# Metadata left by Dolphin file manager, which comes with KDE Plasma.directory# Linux trash folder which might appear on any partition or disk.Trash-*# .nfs files are created when an open file is removed but is still being accessed.nfs*# Log files created by default by the nohup commandnohup.out

Templates from github/gitignore/Global/Linux.gitignore @356fd7b (2026-09-11) · CC0-1.0

Often used together

More template explanations