Search code examples
continuous-integrationyamlgitignore

Should .github worflow yml files be ignored?


Hope you are all doing great :)

This is a simple question, that I found no answer to, online. Should .github/workflow actions (yml files) be added to gitignore?


Solution

  • .gitignore exists to avoid committing certain files to the repository.

    .github/workflow files are usually used to tell GitHub to execute actions. GitHub only knows about files that are committed to your repository.

    Hence, it makes no sense to add those files to your .gitignore since you specifically want them to be in your repository.