Skip to content

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