Error 500 when creating first Wiki page

Gitea version 1.12.5
OS: Windows Server 2012 R2
Git Version: 2.29.2.windows.2

Created a repository.
When trying to create the Wiki, after saving the first get the error 500.

Put into dev mode and see this error:
exit status 128 - fatal: your current branch 'main' does not have any commits yet

Error in log file:
2020/11/10 22:30:24 routers/repo/wiki.go:381:Wiki() [E] GetCommitByPath: exit status 128 - fatal: your current branch 'main' does not have any commits yet

This looks like an issue with branch naming when creating the wiki. The page got added to the “master” branch but the code is looking for the “main” branch. Renaming the master branch to main seems to have resolved the issue.

I am having the same error
routers/repo/wiki.go:381:Wiki() [E] GetCommitByPath: exit status 128 - fatal: your current branch ‘trunk’ does not have any commits yet
The branch is called ‘master’, I am not sure where ‘trunk’ has come from?