Emacs 用 .gitignore
Emacs 用の除外ルール 24 件。そのままリポジトリにコピーして使えます。
拡張可能でカスタマイズ可能なテキスト エディター
Emacs 用 .gitignore の完全版
# LFGitignore によって生成 - https://lfgitignore.com
# 作成日:2026-10-31 21:53:34 UTC
# 技術:Emacs
### Emacs ###
# Emacsのバックアップファイル
*~
# Emacs のファイルの自動保存
\#*\#
# Emacsデスクトップ保存
/.emacs.desktop
# Emacs デスクトップのロック
/.emacs.desktop.lock
*.elc
# Emacs 自動保存リスト
auto-save-list
# Emacs リモート アクセス
tramp
# Emacs ロックファイル
.\#*
# Emacs org-mode の ID
.org-id-locations
# Emacs org-mode アーカイブ
*_archive
# Emacs flymake 一時ファイル
*_flymake.*
# Emacs のシェル履歴
/eshell/history
# Emacs シェルの最後のディレクトリ
/eshell/lastdir
# Emacs パッケージのアーカイブ
/elpa/
*.rel
# Emacs の自動生成ファイル
/auto/
# Emacs Cask の依存関係
.cask/
# 配布ディレクトリ
dist/
# Emacs フライチェック ファイル
flycheck_*.el
/server/
# Emacs Projectile のプロジェクト情報
.projectile
# Emacs ディレクトリのローカル
.dir-locals.el
# Emacs ネットワークセキュリティ
/network-security.data
*.~undo-tree~
Emacs のルールで除外されるもの
以下の各パターンと、.gitignore に含める理由を説明します。
一般的な
| パターン |
除外対象 |
*~ |
Emacsのバックアップファイル |
\#*\# |
Emacs のファイルの自動保存 |
/.emacs.desktop |
Emacsデスクトップ保存 |
/.emacs.desktop.lock |
Emacs デスクトップのロック |
*.elc |
一般的な |
auto-save-list |
Emacs 自動保存リスト |
tramp |
Emacs リモート アクセス |
.\#* |
Emacs ロックファイル |
Org-mode
| パターン |
除外対象 |
.org-id-locations |
Emacs org-mode の ID |
*_archive |
Emacs org-mode アーカイブ |
*_flymake.* |
Emacs flymake 一時ファイル |
/eshell/history |
Emacs のシェル履歴 |
/eshell/lastdir |
Emacs シェルの最後のディレクトリ |
/elpa/ |
Emacs パッケージのアーカイブ |
*.rel |
reftex ファイル |
AUCTeX自動フォルダー
| パターン |
除外対象 |
/auto/ |
Emacs の自動生成ファイル |
.cask/ |
Emacs Cask の依存関係 |
dist/ |
配布ディレクトリ |
Flycheck
| パターン |
除外対象 |
flycheck_*.el |
Emacs フライチェック ファイル |
/server/ |
サーバー認証ディレクトリ |
.projectile |
Emacs Projectile のプロジェクト情報 |
.dir-locals.el |
Emacs ディレクトリのローカル |
/network-security.data |
Emacs ネットワークセキュリティ |
*.~undo-tree~ |
undo-tree |
この Emacs 用 .gitignore の使い方
- 上の Emacs 用ルールをコピーするか、ファイルを直接ダウンロードしてください。
- Git リポジトリのルートに .gitignore という名前のファイルを作り、ルールを貼り付けます。
- 対象のファイルがすでに追跡されている場合は、git rm -r --cached . を実行して再度コミットしてください。Git の除外ルールは未追跡のファイルにのみ適用されます。
- チーム全員で同じルールを共有できるよう、.gitignore をコミットします。