Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Hugo + Github

We will use github for the obvious revision control.

Setup GitHub

Add Github repo online, then

You will need to go to settings, and add the ssh key in the web ui. Github, Settings > SSH Keys

xclip -selection clipboard < ~/.ssh/id_ed25519.pub

Verify SSH Keys:

ssh -T git@github.com

Setup Global Configs

git config --global user.name "James Fraze"
git config --global user.email "james@somesite.com"

Initialize Git Rep

Go head and link the repo so your work can be done on revision control

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:somedomain/site.SOMEDOMAINHERE.git
git remote set-url origin git@github.com:somedomain/site.SOMEDOMAINHERE.git
git push -u origin main
git status

Normal Work Flow

Edit Something

Edit stuff in your content folder as you review with the hugo server running locally on your machine. You’ll be watching http://localhost:1313 as you make edits.

Add Files to Git Push List

You need to add files to the push list so they will be pushed with the push command later.

git add --all

or (lazy add everything)

git add .

or

git add somespecific/file.md

Set Commit Comment

git commit -m "bleh bleh"                  
[master (root-commit) dc4a2eb] bleh bleh
 1227 files changed, 497557 insertions(+)

Branch if you Need to, and Push

This is done only the first time, or if you need a differently named branch.

git branch -M main
git push -u origin main

Or Just Push

Once you have a branch, you just push to that branch

git push

Deploy from Github to Netlify

See netlify notes