# Error 500 when creating first Wiki page

**URL:** <https://forum.gitea.com/t/error-500-when-creating-first-wiki-page/2634>\
**Category:** Install/Maintain/Configure\
**Created:** [November 11, 2020, 4:53am UTC](https://forum.gitea.com/t/error-500-when-creating-first-wiki-page/2634 "2020-11-11T04:53:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoyodyn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/yoyodyn/32/1016_2.png) [@yoyodyn](https://forum.gitea.com/u/yoyodyn)\
**Post date:** [November 11, 2020, 4:53am UTC](https://forum.gitea.com/t/error-500-when-creating-first-wiki-page/2634/1 "2020-11-11T04:53:18Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![yoyodyn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/yoyodyn/32/1016_2.png) [@yoyodyn](https://forum.gitea.com/u/yoyodyn)\
**Post date:** [November 12, 2020, 3:31pm UTC](https://forum.gitea.com/t/error-500-when-creating-first-wiki-page/2634/2 "2020-11-12T15:31:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![congoblue](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@congoblue](https://forum.gitea.com/u/congoblue)\
**Post date:** [December 22, 2020, 10:49am UTC](https://forum.gitea.com/t/error-500-when-creating-first-wiki-page/2634/3 "2020-12-22T10:49:17Z")

</div>

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?
