# \#git

**URL:** https://discourse.gohugo.io/tag/git/11.md

[Latest](https://discourse.gohugo.io/latest.md) · [Categories](https://discourse.gohugo.io/categories.md) · [Tags](https://discourse.gohugo.io/tags.md)

---

## [Recommendation for git structure for code and pages in parallel](https://discourse.gohugo.io/t/recommendation-for-git-structure-for-code-and-pages-in-parallel/56648)

<div class="topic-metadata">

**Author:** [@daviid](https://discourse.gohugo.io/u/daviid)\
**Replies:** 7\
**Last updated:** [April 4, 2026, 3:45pm UTC](https://discourse.gohugo.io/t/recommendation-for-git-structure-for-code-and-pages-in-parallel/56648 "2026-04-04T15:45:03Z")

</div>

Hello, I am looking for some GIT setup best practice advise. GOAL My goal is to achieve a “clean” setup of my Hugo code. I aim to store my code in Codeberg and also serve my website via Codeberg Pages. DESIRED STATE …

---

## [How to migrate git history when using \`hugo import\`?](https://discourse.gohugo.io/t/how-to-migrate-git-history-when-using-hugo-import/55999)

<div class="topic-metadata">

**Author:** [@jwr0](https://discourse.gohugo.io/u/jwr0)\
**Replies:** 2\
**Last updated:** [October 4, 2025, 4:43pm UTC](https://discourse.gohugo.io/t/how-to-migrate-git-history-when-using-hugo-import/55999 "2025-10-04T16:43:13Z")

</div>

This is really a git question, not a hugo question, but I’m probably not the only hugo user who has been through this… I have a pre-existing jekyll blog which I’ve kept for many years in a git repository, like this: ├─…

---

## [Problem with site: wrong links for non default language](https://discourse.gohugo.io/t/problem-with-site-wrong-links-for-non-default-language/54498)

<div class="topic-metadata">

**Author:** [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Replies:** 1\
**Last updated:** [April 24, 2025, 6:58am UTC](https://discourse.gohugo.io/t/problem-with-site-wrong-links-for-non-default-language/54498 "2025-04-24T06:58:12Z")

</div>

When I made the site, I added two languages ​​there. After downloading, English works fine because it is the main language. But when I click the “Russian” button, it takes me to the wrong link, /ru/ is not where it shoul…

---

## [Site problem when hosting on github](https://discourse.gohugo.io/t/site-problem-when-hosting-on-github/54488)

<div class="topic-metadata">

**Author:** [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Replies:** 2\
**Last updated:** [April 24, 2025, 3:11am UTC](https://discourse.gohugo.io/t/site-problem-when-hosting-on-github/54488 "2025-04-24T03:11:07Z")

</div>

When I run the site via hugo server -D it works fine, everything freezes, everything is fine. But after uploading to Github Pages: The downloads link does not open - it says 404, the tags are not displayed, and, although…

---

## [Problem with site on github](https://discourse.gohugo.io/t/problem-with-site-on-github/54419)

<div class="topic-metadata">

**Author:** [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Replies:** 11\
**Last updated:** [April 17, 2025, 12:42pm UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419 "2025-04-17T12:42:24Z")

</div>

when i tried to load my site on github pages everything does not work in it when open, when I try to download from localhost everything is fine, but not public GitHub - anyatomik/AstraLearn: site for astra-learn project …

---

## [GitHub Action to validate shortcodes, image links, and internal page links](https://discourse.gohugo.io/t/github-action-to-validate-shortcodes-image-links-and-internal-page-links/53462)

<div class="topic-metadata">

**Author:** [@sedward5](https://discourse.gohugo.io/u/sedward5)\
**Replies:** 0\
**Last updated:** [February 9, 2025, 1:47am UTC](https://discourse.gohugo.io/t/github-action-to-validate-shortcodes-image-links-and-internal-page-links/53462 "2025-02-09T01:47:04Z")

</div>

I’m new to Hugo. I’ve been using it for a couple of months now. And I’ve really gotten into using shortcodes to streamline posting. As someone with dyslexia, I tend to make a lot of type-os and while building hugo catch…

---

## [GitHub pages deployment died with fatal: No url found for submodule path 'themes/ananke' in .gitmodules](https://discourse.gohugo.io/t/github-pages-deployment-died-with-fatal-no-url-found-for-submodule-path-themes-ananke-in-gitmodules/52940)

<div class="topic-metadata">

**Author:** [@DonGato](https://discourse.gohugo.io/u/DonGato)\
**Replies:** 4\
**Last updated:** [December 31, 2024, 7:09pm UTC](https://discourse.gohugo.io/t/github-pages-deployment-died-with-fatal-no-url-found-for-submodule-path-themes-ananke-in-gitmodules/52940 "2024-12-31T19:09:51Z")

</div>

Hello, Having some recent issues deplouing my hugo sitwwe to Github. All was working as of 2 weeks ago. I noticed fter my recent push that th build failed and my .github dir was missing so I recreated it and added a fr…

---

## [Get "Page not Found" error after "hugo server"](https://discourse.gohugo.io/t/get-page-not-found-error-after-hugo-server/52759)

<div class="topic-metadata">

**Author:** [@johnblood](https://discourse.gohugo.io/u/johnblood)\
**Replies:** 2\
**Last updated:** [December 15, 2024, 12:17pm UTC](https://discourse.gohugo.io/t/get-page-not-found-error-after-hugo-server/52759 "2024-12-15T12:17:21Z")

</div>

I’m having trouble with Hugo on a new install of Fedora. I tried to test the site using hugo server. After the build finished, I tried to access the site via the URL and got a “Page not Found” error in both Brave and Fir…

---

## [What \*do\* I commit to git?](https://discourse.gohugo.io/t/what-do-i-commit-to-git/52247)

<div class="topic-metadata">

**Author:** [@jasonbraganza](https://discourse.gohugo.io/u/jasonbraganza)\
**Replies:** 3\
**Last updated:** [November 3, 2024, 3:55am UTC](https://discourse.gohugo.io/t/what-do-i-commit-to-git/52247 "2024-11-03T03:55:15Z")

</div>

Hello kind folk! I finally decided to version control my blog, now that I have a tiny self hosted forgejo instance. While right now, all I want is version control so that I can pull my files down wherever I want. I mi…

---

## [When using :git for lastmod, pages are tagged with a timestamp of Jan 01, 0001](https://discourse.gohugo.io/t/when-using-git-for-lastmod-pages-are-tagged-with-a-timestamp-of-jan-01-0001/47614)

<div class="topic-metadata">

**Author:** [@fdzero](https://discourse.gohugo.io/u/fdzero)\
**Replies:** 7\
**Last updated:** [January 1, 2024, 8:08pm UTC](https://discourse.gohugo.io/t/when-using-git-for-lastmod-pages-are-tagged-with-a-timestamp-of-jan-01-0001/47614 "2024-01-01T20:08:26Z")

</div>

I was able to overcome my last issue that I posted about with success, got everything working, then realized that my categories for blogs, were showing a date stamp of “Jan 01, 0001” even though none of the other posts o…

---

## [Using modules with a git repository on private server](https://discourse.gohugo.io/t/using-modules-with-a-git-repository-on-private-server/46970)

<div class="topic-metadata">

**Author:** [@juh2](https://discourse.gohugo.io/u/juh2)\
**Replies:** 3\
**Last updated:** [November 8, 2023, 1:40pm UTC](https://discourse.gohugo.io/t/using-modules-with-a-git-repository-on-private-server/46970 "2023-11-08T13:40:05Z")

</div>

I host my repos on my own server without a code hosting software like gitlab or gitea. When I try to init a project as module I get this error. hugo mod init juh@myserver.net:hugoexample.git go: malformed module path "j…

---

## [How to use github secrets inside a markdown file?](https://discourse.gohugo.io/t/how-to-use-github-secrets-inside-a-markdown-file/46028)

<div class="topic-metadata">

**Author:** [@RedeyeFR](https://discourse.gohugo.io/u/RedeyeFR)\
**Replies:** 2\
**Last updated:** [September 4, 2023, 9:09am UTC](https://discourse.gohugo.io/t/how-to-use-github-secrets-inside-a-markdown-file/46028 "2023-09-04T09:09:30Z")

</div>

Hi there ! I’m using Github to host my hugo website repository. I’m trying to use Github Secrets in a markdown page in an objective to prevent the leaking of my contacts details. Well, technically they are on my builded…

---

## [How work with github pages](https://discourse.gohugo.io/t/how-work-with-github-pages/45921)

<div class="topic-metadata">

**Author:** [@wilonweb](https://discourse.gohugo.io/u/wilonweb)\
**Replies:** 3\
**Last updated:** [August 28, 2023, 2:17pm UTC](https://discourse.gohugo.io/t/how-work-with-github-pages/45921 "2023-08-28T14:17:59Z")

</div>

Hello I make my first theme HUGO + Github. So in my repo i have 2 branch : main -gh-pages And I would like to find a solution to work locally on my main branch and when everything is ok, merged to the gh-pages bran…

---

## [How deploy HUGO website on GitPages ( url problem )](https://discourse.gohugo.io/t/how-deploy-hugo-website-on-gitpages-url-problem/45883)

<div class="topic-metadata">

**Author:** [@wilonweb](https://discourse.gohugo.io/u/wilonweb)\
**Replies:** 5\
**Last updated:** [August 27, 2023, 6:14pm UTC](https://discourse.gohugo.io/t/how-deploy-hugo-website-on-gitpages-url-problem/45883 "2023-08-27T18:14:23Z")

</div>

Hello My Website is okay in local. But on GithubPage i saw the homePage. And if i click on the menu i go on (https://wilonweb.github.io/blog/) instead https://wilonweb.github.io/hugo-blank-theme/blog/ Do you know wha…

---

## [Hugo and image processing - best practice for Git hosted/deployed blogs](https://discourse.gohugo.io/t/hugo-and-image-processing-best-practice-for-git-hosted-deployed-blogs/43001)

<div class="topic-metadata">

**Author:** [@gogo](https://discourse.gohugo.io/u/gogo)\
**Replies:** 6\
**Last updated:** [March 1, 2023, 2:34pm UTC](https://discourse.gohugo.io/t/hugo-and-image-processing-best-practice-for-git-hosted-deployed-blogs/43001 "2023-03-01T14:34:59Z")

</div>

I have a blog running with Hugo and I love the SSG, but I’m getting a bit worried about the size of my GitHub repository. When I write a post, I commit it to GitHub and it then deploys to Netlify. I’ve found I have to c…

---

## [.GitInfo and \`fetch-depth\` when using host GUI](https://discourse.gohugo.io/t/gitinfo-and-fetch-depth-when-using-host-gui/43156)

<div class="topic-metadata">

**Author:** [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Replies:** 18\
**Last updated:** [March 1, 2023, 6:14am UTC](https://discourse.gohugo.io/t/gitinfo-and-fetch-depth-when-using-host-gui/43156 "2023-03-01T06:14:57Z")

</div>

When using a GitHub Action (GHA) to publish my site, I know (thanks to an old thread on this Discourse) to specify fetch-depth: 0 in the branch checkout so that my use of .GitInfo will produce the desired result: mainly,…

---

## [Creating a Hugo site in existing github repo](https://discourse.gohugo.io/t/creating-a-hugo-site-in-existing-github-repo/42988)

<div class="topic-metadata">

**Author:** [@sabasdad](https://discourse.gohugo.io/u/sabasdad)\
**Replies:** 3\
**Last updated:** [February 16, 2023, 3:24am UTC](https://discourse.gohugo.io/t/creating-a-hugo-site-in-existing-github-repo/42988 "2023-02-16T03:24:09Z")

</div>

I have a git repo git.mycompany.com/doco that already contains hundreds of markdown document files with many users contributing. I want to publish these documents on github pages using Hugo but don’t want to create a new…

---

## [Build problems: Failed to read Git log - exit code 255](https://discourse.gohugo.io/t/build-problems-failed-to-read-git-log-exit-code-255/42325)

<div class="topic-metadata">

**Author:** [@bienflorencia](https://discourse.gohugo.io/u/bienflorencia)\
**Replies:** 7\
**Last updated:** [January 23, 2023, 10:34am UTC](https://discourse.gohugo.io/t/build-problems-failed-to-read-git-log-exit-code-255/42325 "2023-01-23T10:34:30Z")

</div>

I can’t build my site through Netlify, something stopped working. I have another website and it is building ok, I’m not sure what is the issue with mine. Please, can you help me with this issue? My project repo is: GitH…

---

## [Gitlab pages hosting, GitInfo](https://discourse.gohugo.io/t/gitlab-pages-hosting-gitinfo/37045)

<div class="topic-metadata">

**Author:** [@drElektron](https://discourse.gohugo.io/u/drElektron)\
**Replies:** 4\
**Last updated:** [February 8, 2022, 3:47pm UTC](https://discourse.gohugo.io/t/gitlab-pages-hosting-gitinfo/37045 "2022-02-08T15:47:34Z")

</div>

This is more of call for opinion rather than a desperate cry for help. I just updated my site configuration to reflect an update to the docs that changed the suggested image container from monachus to Gitlab’s own conta…

---

## [Github Action - found no layout file for "HTML" for](https://discourse.gohugo.io/t/github-action-found-no-layout-file-for-html-for/35050)

<div class="topic-metadata">

**Author:** [@Hugo-prod](https://discourse.gohugo.io/u/Hugo-prod)\
**Replies:** 1\
**Last updated:** [October 7, 2021, 7:04pm UTC](https://discourse.gohugo.io/t/github-action-found-no-layout-file-for-html-for/35050 "2021-10-07T19:04:27Z")

</div>

Hello I don’t understand why I have these errors Run hugo --config config.yaml Building sites … WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matche…

---

## [Can I create a resource from an external URL during build?](https://discourse.gohugo.io/t/can-i-create-a-resource-from-an-external-url-during-build/34073)

<div class="topic-metadata">

**Author:** [@LandGod](https://discourse.gohugo.io/u/LandGod)\
**Replies:** 5\
**Last updated:** [August 4, 2021, 6:23pm UTC](https://discourse.gohugo.io/t/can-i-create-a-resource-from-an-external-url-during-build/34073 "2021-08-04T18:23:19Z")

</div>

I have a rather odd use-case where I need to serve a few short mp4 videos on my Hugo site and I need them not to be external resources (for caching purposes). Now normally I’d just drop the videos into my assets folder a…

---

## [Push to GitHub Triggers Push to Remote](https://discourse.gohugo.io/t/push-to-github-triggers-push-to-remote/33674)

<div class="topic-metadata">

**Author:** [@AdamSpann](https://discourse.gohugo.io/u/AdamSpann)\
**Replies:** 0\
**Last updated:** [July 3, 2021, 7:52am UTC](https://discourse.gohugo.io/t/push-to-github-triggers-push-to-remote/33674 "2021-07-03T07:52:26Z")

</div>

Hi, Today I would like to go over how I changed things up a bit and am now able to push my site updates to GitHub, which then pushes the updates to the live production server. This should allow me to add checks within G…

---

## [Auto Update Site from a Git Push](https://discourse.gohugo.io/t/auto-update-site-from-a-git-push/33501)

<div class="topic-metadata">

**Author:** [@AdamSpann](https://discourse.gohugo.io/u/AdamSpann)\
**Replies:** 1\
**Last updated:** [June 22, 2021, 4:04pm UTC](https://discourse.gohugo.io/t/auto-update-site-from-a-git-push/33501 "2021-06-22T16:04:54Z")

</div>

Hi, For a little while now I have been thinking about moving my personal blog to a self-hosted service. One of the options I have been considering is Linode. As part of this idea. I wanted to see how I might be able to…

---

## [About GitInfo (Git Info Variables)](https://discourse.gohugo.io/t/about-gitinfo-git-info-variables/30098)

<div class="topic-metadata">

**Author:** [@antoinentl](https://discourse.gohugo.io/u/antoinentl)\
**Replies:** 8\
**Last updated:** [January 4, 2021, 7:07pm UTC](https://discourse.gohugo.io/t/about-gitinfo-git-info-variables/30098 "2021-01-04T19:07:50Z")

</div>

I’m a fan of the Git Info Variables, very useful for showing Git information for a website generate with Hugo (and manage with Git). Perhaps I miss something but is it possible to display all the commits for a file/page …

---

## [Hello, my blog load is slow, what is the reason?](https://discourse.gohugo.io/t/hello-my-blog-load-is-slow-what-is-the-reason/30208)

<div class="topic-metadata">

**Author:** [@flight025](https://discourse.gohugo.io/u/flight025)\
**Replies:** 1\
**Last updated:** [December 25, 2020, 12:36pm UTC](https://discourse.gohugo.io/t/hello-my-blog-load-is-slow-what-is-the-reason/30208 "2020-12-25T12:36:33Z")

</div>

Slow loading of blog，In the developer tool, display “all.css:1 Failed to Load resource: net::ERR\_TIMED\_OUT”. What happens? What do I need to do?

---

## [Hugo.exe too large for GitHub](https://discourse.gohugo.io/t/hugo-exe-too-large-for-github/29594)

<div class="topic-metadata">

**Author:** [@Brenda89](https://discourse.gohugo.io/u/Brenda89)\
**Replies:** 6\
**Last updated:** [November 23, 2020, 6:15pm UTC](https://discourse.gohugo.io/t/hugo-exe-too-large-for-github/29594 "2020-11-23T18:15:39Z")

</div>

Hi, I have created a site through Hugo and so far everything works out perfectly. However, when I try to upload my files to GitHub, I get an error because my hugo.exe is too big (162 MB). Can someone explain how this i…

---

## [How to reset your main branch to a recently known working version](https://discourse.gohugo.io/t/how-to-reset-your-main-branch-to-a-recently-known-working-version/28767)

<div class="topic-metadata">

**Author:** [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Replies:** 1\
**Last updated:** [October 11, 2020, 8:54pm UTC](https://discourse.gohugo.io/t/how-to-reset-your-main-branch-to-a-recently-known-working-version/28767 "2020-10-11T20:54:43Z")

</div>

Here is a quick guide on how to reset your repository, main branch and live website to a previously proven working version without loosing changes since then. First the CLI stuff: cd your-website git checkout main git…
