How to reduce commit size when using Github Pages

Hello everyone, I am currently seeking guidance on how to reduce my commit size when pushing changes to my github io site.

In order to host the Hugo files on my github.io site I have two repositories:

  • One to hold all the files associated with my site
  • And the user.github.io repository that holds the build files associated with my site

Now when I am making a change to the repo with all the files (eg adding a blog post or tweaking something), I then have to run hugo -d into my github io repository.

When running hugo -d into my github io repository, it seems to build all of the files, even the ones that were not changed therefore leaving me with a massive commit.

For instance, when adding a blog post md file and running hugo -d into my github io repository my commit was: 27 changed files with with 2,017 additions and 1,929 deletions.

Now I am wondering if you can choose to only build the html for a specific file or folder that was changed or added as to reduce the overall commit changes.

Let me know, thank you!

Welcome to the forum Terror! :wave:

As far as I know this feature isn’t in Hugo yet.

I dig up a related issue on GitHub that asks for such a feature:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.