Update Gitignore

VerifiedSafe

Adds specific files or directories to .gitignore to prevent git from tracking them. It checks if the item is already ignored or tracked, updates .gitignore, and optionally untracks files that were previously tracked. Useful for keeping sensitive or build artifacts out of version control.

Sby Skills Guide Bot
DevOpsBeginner
706/2/2026
Claude CodeCursorWindsurfCopilotCodex
#gitignore#git#file-management

Recommended for

Our review

Adds specific files or patterns to .gitignore to prevent them from being tracked by Git.

Strengths

  • Automates adding common patterns (logs, dependencies, builds).
  • Checks if the file is already tracked and untracks it if needed.
  • Adds explanatory comments for each entry.

Limitations

  • Does not handle complex patterns or advanced globs.
  • Does not update .gitignore if it's in a subdirectory.
  • May require manual confirmation to avoid unintended exclusions.
When to use it

Use this skill when you need to quickly ignore generated or sensitive files without deleting them.

When not to use it

Avoid this skill if you need to manage exclusions across multiple directory levels or prefer to set up global exclusions via git config.

Security analysis

Safe
Quality score80/100

The skill only uses standard git commands (git ls-files, git rm --cached) to manage .gitignore files. There is no destructive action, no network exfiltration, no obfuscated code, and no attempt to execute arbitrary commands or disable safety features.

No concerns found

Examples

Ignore node_modules
Add node_modules/ to .gitignore and untrack it if already tracked.
Ignore environment files
Add .env and .env.local to .gitignore with a comment explaining they contain secrets.
Ignore build output
Add dist/ folder to .gitignore and check if any files inside were already tracked.

name: ignore description: 不要なファイル・ディレクトリを .gitignore に追加・管理する

Update Gitignore

This skill adds specific files or patterns to .gitignore to prevent them from being tracked by git.

Instructions

  1. Check Status:

    • Check if the file/directory is already in .gitignore.
    • Check if the file is currently tracked by git using git ls-files <path>.
  2. Update .gitignore:

    • Append the path or pattern to the .gitignore file in the root directory.
    • Add a comment if necessary to explain why it's ignored.
  3. Untrack (if needed):

    • If the file was already tracked, run git rm --cached <path> to stop tracking it while keeping the local copy.
Related skills