Course outlines for learning terraform.
expected time | requirements |
---|---|
60 minutes | A browser. |
Goal: Learn to work with Git.
You can write code on your laptop or a shared (bastion/jump) server. Without a version control system system, it’s difficult to work together, track changes, understand who has done what and many other issues.
Using a version control system is sort of required when writing code.
“If it’s not in git, svn or cvs, it does not exist.”
Git is a version control system. Alternatives are:
Here is what I do to setup a new repository.
git init
git add .
git commit -m "Initial commit."
When the code is sort of ready, I’ll create a repository on GitHub and push the code.
git remote add origin https://github.com/robertdebock/bla.git
git push -u origin master
By now CI/CD tests the code and it’s never occurred to me that the code was flawless the first attempt. So, fix the issue, try again.
git add .
git commit -m "Fix something."
git push
Some commands can be combined: git add .
and git commit -m "Fix something."
can be combined: git commit -am "Fix something."
When contributions happen, I’ll merge it online, but have to remember to pull.
git pull
You’re done when you can use these commands: (Likely scenario 1, 2 and 3.)
git clone
git add
git commit
git push
git pull
An explanation on Git if you’ve got time to spare.