Best Gitignore Code For Hugo?

Dear All

I have this code for my root gitignore files ->

/public/
/resources/_gen/

hugo.exe
hugo.linux
hugo.darwin

But I still curious if it’s the best gitignore or not for Hugo building time process?

Regards

Hi @BayuAngora!

In regards of .gitignore files I usually just check out the actual project. Have a look at https://github.com/gohugoio/hugo/blob/master/.gitignore to get an overview of what they exclude from Git.

Another good resource is https://gitignore.io/. You can add all the tools you’re using and it will generate an appropriate .gitignore file.

1 Like

Thanks. I will try it.

good suggestion, @flo! I use those too :slight_smile: