Date posted: 26 Nov 2021, 1 minutes to read

GitHubs magic files

I keep coming across files in GitHub that have some mystic magic feeling to them. There’s always a small incantation to come with them: the have to have the right name, the right extension and have to be stored in the right directory. I wanted to have an overview of all these spells for myself, so here we are 😉.

Photo of a cauldron with a person pointing a want to it, mist coming out of the cauldron

Photo by Artem Maltsev on Unsplash


A list of all the magic files that I came across in GitHub.

Filename Location .github repo support Description Docs
CNAME root   Alias for the GitHub Pages site root, /docs or .github yes How to contribute to a project guidelines   yes Code of conduct  
CODEOWNERS     List of people who can make changes to the files or folders  
CITATION.cff root no Let others know how to citate your work cff   no   yes   yes   yes    
FORM-NAME.yml .github/ISSUE_TEMPLATE/   Issue templates templates
config.yml .github/ISSUE_TEMPLATE/   Issue templates configuration settings template chooser
dependabot.yml .github/   Dependabot configuration file dependabot configuration
codeql-config.yml .github/codeql/codeql-config.yml (convention, not required) sort of CodeQL configuration file. Can also be stored in an external repository (hence .gthub repo works). If using external repo, referencing can by done by using owner/repository/filename@branch CodeQL config
secret_scanning.yml .github/secret_scanning.yml   Secret scanning configuration file secret scanning root / ?   Project readme, also used on marketplace if the repo is published to the marketplace .github/username/username   Profile readme About readme’s organizations .github repo: profile/   Organization readme Organization readme
workflow.yml .github/workflows/     workflows
action.yml/action.yaml root   Configuration file for an actions repository  

Some of these are extra tricky, like for example the organization profile lives in a different directory and repo then the user profile readme: .github repo in the org and then in a folder named profile:

Screenshot of creating the .github repo