How to automatically backup the local directory that contains both Hugo files and the Git repo?
Question :
I know I can save the files on a local directory thats synced to the cloud e.g. Dropbox, pCloud etc. But this means I cannot create a Git repo in this folder as one cannot create a Git repo in a directory that exists both in the cloud and is mapped to my machine (thats my newbie experience anyway).
Is there a way to automatically backup the local directory to the cloud and use the same directory with a remote Git repo?
Answer :
You need to create yourself a README.md in your repo to remember these steps when in some months you want to recreate the site. The problem is, that neither Git nor Hugo is automatically loading the theme in your theme folder. So you basically have to follow these steps:
git clone https://github.com/sientelo/backup-test
cd backup-test
git submodule init
git submodule update
or, if you want to feel like an expert:
git clone --recurse-submodules https://github.com/sientelo/backup-test
Then it works without errors. (If the test repo should have content then we have a follow up problem - hugo server shows a site, but no content :slight_smile:)
Posting Komentar untuk "How to automatically backup the local directory that contains both Hugo files and the Git repo?"