# How to manage themes you edit as git submodules?

**URL:** https://discourse.gohugo.io/t/how-to-manage-themes-you-edit-as-git-submodules/7509
**Category:** support
**Created:** [July 19, 2017, 4:11pm UTC](https://discourse.gohugo.io/t/how-to-manage-themes-you-edit-as-git-submodules/7509 "2017-07-19T16:11:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![hourback](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hourback/32/3658_2.png) [@hourback](https://discourse.gohugo.io/u/hourback)
#### Post date: [July 19, 2017, 4:11pm UTC](https://discourse.gohugo.io/t/how-to-manage-themes-you-edit-as-git-submodules/7509/1 "2017-07-19T16:11:51Z")

</div>

Hi, all.

I hope I’m asking this question correctly and clearly. 🙂

I created a Hugo site and used a theme I installed as a git submodule. I’m using GitHub Pages for hosting my site. I edited the theme and am now wondering how I should manage those changes.

My first thought was to fork the theme’s repo and use _that_ as my theme’s remote origin. I would be able to commit my theme changes however I’d like. Is there a reason why this isn’t a good idea?

Are there any other good ways to do this or best practices in this regard?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![budparr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/budparr/32/749_2.png) [@budparr](https://discourse.gohugo.io/u/budparr)
#### Post date: [July 19, 2017, 4:29pm UTC](https://discourse.gohugo.io/t/how-to-manage-themes-you-edit-as-git-submodules/7509/2 "2017-07-19T16:29:45Z")

</div>

I think you’re on the right track (with forking), but the simplest way is to just override the theme in your root directory: [https://gohugo.io/themes/customizing/#override-template-files](https://gohugo.io/themes/customizing/#override-template-files)

I suppose it depends on the degree of changes you want to make.

---

<div class="post-metadata">

### Author: ![hourback](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hourback/32/3658_2.png) [@hourback](https://discourse.gohugo.io/u/hourback)
#### Post date: [July 19, 2017, 4:48pm UTC](https://discourse.gohugo.io/t/how-to-manage-themes-you-edit-as-git-submodules/7509/3 "2017-07-19T16:48:46Z")

</div>

Ah-ha! You have enlightened me!!! 🙂 Thank you very much, @budparr!

---

<div class="post-metadata">

### Author: ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)
#### Post date: [July 19, 2017, 9:40pm UTC](https://discourse.gohugo.io/t/how-to-manage-themes-you-edit-as-git-submodules/7509/4 "2017-07-19T21:40:39Z")

</div>

@budparr is right about the override thing, but I would (normally) only fork if I have to. Just adding the original theme as a submodule below /themes has its benefits – you can just pull in updates/fixes etc. as you please without thinking about Git merging.

---

<div class="post-metadata">

### Author: ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)
#### Post date: [July 20, 2017, 2:51pm UTC](https://discourse.gohugo.io/t/how-to-manage-themes-you-edit-as-git-submodules/7509/5 "2017-07-20T14:51:45Z")

</div>

> [@bep](#):
>
> Just adding the original theme as a submodule below /themes has its benefits

As well as better CI/CD friendliness compared to `git clone`.
