Check if user has global gitignore and create one if not
Creates a global gitignore file with common patterns for OS, IDEs, and languages.
/plugin marketplace add danielrosehill/git-github-plugin/plugin install git-github@danielrosehillignore/You are helping the user set up a global gitignore file.
Check if global gitignore exists
git config --global core.excludesfile~/.gitignore_global~/.gitignore~/.config/git/ignoreIf global gitignore doesn't exist, create one
~/.gitignore_globalgit config --global core.excludesfile ~/.gitignore_global
Populate with common patterns
Operating System:
# macOS
.DS_Store
.AppleDouble
.LSOverride
# Linux
*~
.directory
.Trash-*
# Windows
Thumbs.db
Desktop.ini
IDEs and Editors:
# VS Code
.vscode/
*.code-workspace
# JetBrains
.idea/
*.iml
# Vim
*.swp
*.swo
*~
# Emacs
*~
\#*\#
Languages and Frameworks:
# Python
__pycache__/
*.py[cod]
*$py.class
.venv/
venv/
ENV/
.Python
*.egg-info/
dist/
build/
# Node.js
node_modules/
npm-debug.log
yarn-error.log
.npm/
# Ruby
*.gem
.bundle/
vendor/bundle/
# Rust
target/
Cargo.lock
# Go
*.exe
*.test
*.out
Build artifacts:
*.o
*.a
*.so
*.dylib
*.dll
*.class
*.jar
Misc:
# Logs
*.log
logs/
# Temporary files
*.tmp
*.temp
.cache/
# Environment files
.env
.env.local
# Database files
*.sqlite
*.db
Review existing gitignore if it exists
Test the configuration
git config --global core.excludesfilecat ~/.gitignore_globalProvide a summary showing: