Purge git repo history

I mentioned in a previous post that I had used git and git hooks to upload Hugo blog posts to my server, and that I am now using rsync as a faster more succinct alternative. This has left me with lot of git history in my .git folder, which I really don’t need. I don’t think I am ever going to want to recover a blog post version, ever. So I thought why not just delete all the history and reduce the junk in the site directories. ...

28 March 2023 · Mark

Git Hooks to Rsync

Getting un-hooked You Git I have been using Git Hooks to sync local Hugo website files to my remote server. This has worked well, mostly, but I wondered if it was the most efficient way of syncing up. I use Git on the local web structure and so have version control. Using Hooks allows me to upload to a remote location and then have the remote server copy the modified file into the live site directory,. This involves a few steps and some repetition and isn’t completely error free. If the Hooks location gets out of sync, which it did for me a couple of times I had no alternative, at least one that worked, but to recreate the Hook directory and start again. ...

1 March 2023 · Mark

Git Version Control Setup

After a few false starts I have finally got my Hugo site setup to use git submodule to push the HTML output to the remote webserver. It was a little involved at first, but once I got my head around the idea of a git repo within a git repo, not being a git repo but rather just a folder marked as a submodule of some parent module… you get the idea. A confusing concept that is simple and sounds simple, but isn’t explained particularly well in any article I found. ...

25 October 2021 · Mark