Ansible is an incredible configuration management and provisioning utility that enables you to automate all the things. In this series, you’ll learn everything you need to know in order to use Ansible for your day-to-day administration duties. In part 3, we take a look at another foundational concept – Git. Everyone who effectively implements automation uses Git, and in this video, we look into creating a repository and how to push changes.
Check if git is installed
sudo apt update
sudo apt install git
Create user config for git
git config --global user.name "First Last"
git config --global user.email "email@example.com"
Check the status of your git repository
Stage the README.md file (after making changes) to be included in the next git commit
git add README.md
Set up the README.md file to be included in a commit
git commit -m "Updated readme file, initial commit"
Send the commit to Github
git push origin master