# Quick Tip for Symbolic Links

**URL:** <https://discourse.gohugo.io/t/quick-tip-for-symbolic-links/14185>\
**Category:** tips & tricks\
**Created:** [September 12, 2018, 1:48pm UTC](https://discourse.gohugo.io/t/quick-tip-for-symbolic-links/14185 "2018-09-12T13:48:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [September 12, 2018, 1:48pm UTC](https://discourse.gohugo.io/t/quick-tip-for-symbolic-links/14185/1 "2018-09-12T13:48:46Z")

</div>

Ok…

Assuming you have a created a local symlink under `/assets/` that points to an `img` directory under `/static/img` because you need to process images on the fly with `.resources.Get`

You will discover that while everything works fine locally, if you deploy to Netlify the build will fail because the symlink on your remote repo needs to be: `/opt/build/repo/static/img` for the Netlify Build to work.

So how can you keep 2 different versions of this `symlink` for local development and for the Netlify Build in your remote.

`.gitignore` will not work because the symlink has already been committed to production.

Instead use the following command at the root of your Hugo project:  
`git update-index --assume-unchanged assets/img`

And now you can have 2 different versions of that symlink and `git` will not complain.

If you need to undo the above command you can use `git update-index --no-assume-unchanged assets/img`

And that’s all there is to it.

---

<div class="post-metadata">

**Author:** ![Europrimus](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@Europrimus](https://discourse.gohugo.io/u/Europrimus)\
**Post date:** [November 9, 2026, 8:27pm UTC](https://discourse.gohugo.io/t/quick-tip-for-symbolic-links/14185/2 "2026-11-09T20:27:52Z")

</div>

Symbolic links could be relative.  
In your case, it could be `/assets/my-img.png -> ../static/img/my-img.png`

[edit] Symbolic links not more supported by hugo.  
You need to use `mount` in [Configure modules](https://gohugo.io/configuration/module/#default-mounts)

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [November 10, 2026, 1:49am UTC](https://discourse.gohugo.io/t/quick-tip-for-symbolic-links/14185/3 "2026-11-10T01:49:01Z")

</div>

Archived on November 10, 2026, 1:49am UTC


