Cloud Automation 101 - Introduction to Cloud Automation, Azure DevOps, Infrastructure As Code (IaC), PowerShell, Azure Resource Manager (ARM), Unit-Testing with Pester, CI/CD Pipeline with Azure DevOps and more!

View project on GitHub

Cloud Automation Version Control < >

Table of content

Version Control Introduction

Version control systems are software that help you track changes you make in your code over time. As you edit to your code, you tell the version control system to take a snapshot of your files. The version control system saves that snapshot permanently so you can recall it later if you need it. By: Robert Outlaw Link

Version Control Tools

Git Introduction

Git Installation

Install git via Chocolatey.

choco install git

Git Common Commands

Table to list the common commands used in git They are ordered by execution flow.

Command Description
git status Show the working tree status
git fetch Updates the local repository with all remote changes
git pull Fetch from and integrate with another repository or a local branch
git branch List, create, or delete branches
git branch -v -a List, create, or delete branches -all -verbose (Including Remote Branches – in case you are missing them locally)
Git checkout - - track origin/feature/… Checkout specific branch – including remote branches if you are missing them locally.Use origin/feature/ (don't include the remote/ before)
git add . Adds all changes in the current directory (and sub directories) to the staging (need commit after)
git add Adds a specific file to the staging (Needs commit after)
git commit -am “Text” Commit the changes (provide a descriptive message like “adds” ,”removes”, “fixes” - those commit messages should describe the changes made)
git push Update remote refs along with associated objects

A common sequence to check in code is:

git add .
git commit -am '<COMMITMESSAGE>'
git push

Where add . stages all files. commit -am commits all changes with a given message. And push changes into remote repository. For more details see Save and share code with Git


Get Free AzureSubscription and Azure DevOps access through Visual Studio

Next Cloud Automation Software Testing