Learn DevOps #2step Version Controlling system

Learn DevOps #2step Version Controlling system

Getting Hands-on with #devops Git & Github is the 2 steps to learning this and getting familiar with the version controlling system. there are some other tools but at starting you can be familiar with this.


Install Git on Linux

?

Open your terminal, use the following command as sequences

???????????apt update

???????????apt install git

#if any error occurs follow this link:

???????????https://itsfoss.com/could-not-get-lock-error/

?

???????????git config --global user.name M.Qasim Sultani

???????????git config --global user.email [email protected]

?

?

How To Push Your Website On Github:

?

#Create a new repo on github.com

#Go to the folder in which your website exits on the terminal:

???????????git init

???????????git add .

???????????git commit –m?“the first commit ”

???????????git remote add origin repo name

???????????git push origin master

#now give your GitHub user name & password

#File push successfully

?

How to add a new file on existing repo

???????????git status ?: (red color files exits means ?new file are here which was not on git staging area )

???????????git add .

???????????git status?: (green color files)

???????????git commit -m "Add existing file"

???????????#after the above command enter your user name and password authentication link

?

How to clone / Pull files on existing repo

???????????Git clone https://github.com/QasimSultani/wordpress.git (repo url you want to pull)

?

How to clone/ Pull Specific files on existing repo

#Go to the folder where you did init

???????????git pull origin main

?

How to make a new branch and push the files & clone

???????????git checkout -b branch2 #create new branch

???????????git branch # show All branch

???????????git checkout master #move to another branch

???????????git checkout branch2

???????????git add .

???????????git commit –m “new branch files edit”

???????????git push original branch2

#now for clone

#Go to the folder where you did init

???????????git pull origin branch2

?

?

?

?This is the 2 steps of learning DevOps first you have to be familiar with the #linux OS. you can check the basic Linux command here https://www.dhirubhai.net/posts/muhammad-qasim-sultani_some-basic-linux-command-for-devops-person-activity-6966516536119316480-NGPh?utm_source=share&utm_medium=member_desktop

These are some steps that help you to push and pull your code from the repo if you guys face any problems just comment or inbox #linux #git Muhammad Qasim Sultani #devops #devopsdays

.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了