Skip to content

feat: enhance ignore file support with local and global configurations #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Sma1lboy
Copy link

@Sma1lboy Sma1lboy commented Aug 2, 2025

issue: #344

This pull request enhances file ignore functionality in OpenCommit by introducing support for global ignore files, improving usability and flexibility. The changes include updates to the documentation and the implementation of the ignore file handling logic.

Documentation Updates:

  • README.md: Updated to describe the support for both local and global .opencommitignore files. Added examples for each type and clarified priority rules (local rules override global rules).

Code Enhancements:

  • src/utils/git.ts:
    • Imported existsSync from fs and homedir from os to enable checking for and locating global ignore files.
    • Modified the getOpenCommitIgnore function to:
      • Check for a global .opencommitignore file in the user's home directory and apply its rules if present.
      • Retain support for local .opencommitignore files, with local rules taking precedence over global rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant