Hugo GIT
Source Control (GIT) Initialise
This step is how to add our site to source control. This allows the site to be deployed, as well as maintaining source control so that we have a copy of the site at a point in time, and can restore back to that in case of any issues.
This assumes that git and GitHub desktop have been installed. You will also need a github account.
- Open a window command prompt
- In the command prompt type:
cd c:/hugo/sites/example.com
This will change the current directory to c:\hugo\sites\example.com. This is the location that we set up earlier to contain the details of the site that we are creating. - In the command prompt type:
git init
This will - In the command prompt type:
git status
This will - In the command prompt type:
git add .
This will - In the command prompt type:
git commit -m "Initial Commit"
This will - In the command prompt type:
git status
This will - Open GitHub desktop
- Add local repository
- Publish repository
For more learning, check out:
- TODO