By Antoine Fongang.nov 23, 2022

Imagine that as a DevOps engineer you work for a company that starts implementing the DevOps culture, but they currently do not have DevOps practice or technology.
Your first mission as Avops -Enginer is to implement the gitub a Gitub for software version management Sellse Thes does not use it, everything at this company is locally on the developer computer. The Compamy wants to change and start using a DevOps culture.

GIT and Github are two technologies that EVEY developer should learn, regardless of their field.
If you are a beginners developer, you may think that two tires mean the same – but they are different.
Architecture:
Condition: Let Github -Accounts sign at https://github.com/

My mission as a Devotes Engineer is acting for Migrata application and website code from Repository to external repositories on Github and also to do a proof of concept to show the Unomontan how the process of the Commit -Push and Keer Code changes would work so that the solution can be validated and can be validated.
Implementation: We will break this project in 3 different parts:
Part1: Set to local repository
# Make a folder: Mkdir DevOps-Cloud
# Access to the folder: CD DevOps cloud
# Make another folder: MKDIR SRC
# Access to the folder: CD SRC
# Download Website files: Curl -k -l -Output Website.zip https: // tcb
# Unzip Website -file: Unzip Website.zip

# Install VScode -Extension:
Link to download GIT: https://git-scm.com/downloads
# Website Testing: Index.html ‘Open’ with Live Server ‘| Vscode

# Git initialize: Git Init
# Heraming Branch: Git Branch –M Main
# Git -status check: Git status | “We don’t want the ‘Website.zip’ file as part of the solution!”
# Ignore a git file: touch .gitignore
# Website.zip -file Add to the GIT Nighten File: VI .Gitignore | Insert key Website.zip | ESC | : WQ!

# Add files to ‘Stage Area’ (waiting for Commmit …):
Add.

Remaining from the stage: Git RM -R -ingoedjes.
Add.

# Set the name/e -mail from the author:(Using the same as the Github account)
Git Config – Global User. ItCloudGCP10
Git Config – Global User.EMail itCloudGCP10@gmail.com
Git Config – List

# Committed the first version of the website:
Git Commit -M ‘Website first version!’
# Git -status check: Git status

Part 2: Github set up
# Making to Repository: DevOps-Cloud
# Github -Info Set (if you use references for the name/e -mail of the author):
Git conf user.name itcloudgcp10
Git conference user.email itcloudgcp10@gmail.com
# Local Connect | Remote Repositary (Origin): Git Remote Origin origin [ url remote repository ]
[url remote repository] Is https://github.com/itcloudgcp10/devops-cloud.git

# Control repository remotely:
External GIT -V
# Local repositary to remote:
Git Push -u Origin Main
# It is asked to log in to Github: “Register with your browser” | Authorize Gitcradential Manager
# Renew on Github Page!
# ‘Korte Sha1 hash’ -comparison with git log show!
# Modifing index.html from Github: File edit | Example file Commit | Changes

▒ View an example of the changes made to Github:
https://ra.githack.com/
https://htmlpreview.github.io/

# Check whether the local repository up -To -date is:
Git Remote Show Origin
# Download / Update the local repository:
Git Pull

Part 3: Perform Sub tests for code changes
# Index.html -file ‘H1’ change to ‘H3’
Git Commit -am ‘Changing H1 in H3’ [adding and commiting]
Git Log
Git show [hash]

# Update/upload external repository:
Git Push -u Origin Main
# Reduce the last commit:
Git returns hash
# Check whether the external repository up -To date is:
Git Status One

# Update/upload external repository:
Git Push -u Origin Main
Git Status One
At the end of this mission and complete these tasks:
– Uploads the code that is stored on my Latop to Github,
– validate the characteristics between the reposites (locally and remotely),
– Rons subtests of code changes, both from external to local and vice versa,
– Enter the validation process, perform a Rolback procedure/approve tests back
The local repository with git and the external repository with github have been updated and synchronized !!!

Congratulations !!!

Reference:
The original article published on medium.