Update to 0.75.1

I have installed 0.74.3 using git and the install script. I want to update to the newest 0.75.1. Can someone refresh my memory and remind me how to update the source code using git or do I have to delete the existing hugo binaries and start all over again?

If you are on Mac, Hombrew is a great way to update binaries. I’m sure that Win and Linux ppl can offer solutions for those.

With Home brew you can install :

brew install hugo

and then upgrade when needed

brew upgrade hugo

I am on Linux. I just can’t remember how to update a local git repo pulling from the remote repo. But never mind, I will recompile from source by cloning the new release from the remote git repo.

git is a nice tool but sometimes rather intimidating :wink:

1 Like

I finally took the plunge into the man git and here is how to synchronise the local git repo with the latest stable release from the upstream repo, the official Hugo GitHub repo:

First cd into the existing hugo local repo containing the .git directory. Then:

$ git fetch
$ git pull

Check the status with $ git status and you should have:

On branch stable
Your branch is up to date with 'origin/stable'.
nothing to commit, working tree clean

Finally, install the new Hugo version:

go install --tags extended


$ hugo version
Hugo Static Site Generator v0.75.1/extended linux/amd64 BuildDate: unknown

Better probably:

git pull
git checkout v0.75.1

You will end up in the exact revision that is this release. The branch stable might change or accidentally not have the latest revision if it’s not merged properly. The version tags are the ones that get packaged for download.

1 Like

Ok, thanks for the clarification. My git practise is a bit rusted!

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