kevin

git notes

Git setup basic git init # create a git user name git config --global user.name "FIRST_NAME LAST_NAME" git config --global user.email "MY_NAME@example.com" # create git ignore files touch .gitignore # add items to the…

Git setup basic

git init 
# create a git user name 
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "MY_NAME@example.com"
# create git ignore files
touch .gitignore 
# add items to the ignore list (# update with examples)
# create master branch
git add .gitignore
git commit -m 'init'
# create development branch
git branch dev
git checkout dev

#  Note to self
# add more info about the differences>
# git init --bare
# git init 

Goal

Try to keep the git folder as "light" as possible, exclude heavy files like videos and photos. Code can instead reference specific folders on the filesystem were these files are stored. This helps with both organization and file size as well as backup methods.

du -h 
82M     ./.git/objects
82M     ./.git

what is git checkout

git branch

Docker secrets

comments from around the web

No. Store the key as a docker/k8s secret. Or use cloud platform integrations, such as AWS EKS and IAM. Or use dynamic cert generation and dissemination like SPIFFE or SPIRE. Or use a service mesh and SaaS integration, such as Consul and Vault. Theres a lot of options beyond using env vars, and you should opt for certs over keys for authn whenever possible.

git move folders