Gitea customization folder (gitignore, etc.)

I was trying to find out where and how to create a custom .gitignore template for my repos.
Looking around I found out it is here:

/opt/gitea/custom/options/gitignore

I had to manually create the folders options/gitignore.
Then within it place as many files you want, no extension, just the name of the template, for example:
Godot
and inside:

# Godot-specific ignores
.import/
export.cfg
export_presets.cfg

# Mono-specific ignores
.mono/

I hope this will be useful to someone else too.

2 Likes

Hi @Toshiwoz

Thanks for the tip. Is this specific to yunohost or to gitea ?

This is specific to Yunohost’s Gitea installation (at least the /opt/gitea/ part of the folder location).
If you install Gitea on a regular server, it will use different folders AFAIK.

Here is the general information:
https://docs.gitea.io/en-us/customizing-gitea/