Day 9 Task: Deep Dive in Git & GitHub for DevOps Engineers.

Day 9 Task: Deep Dive in Git & GitHub for DevOps Engineers.

  1. What is Git and why is it important?

Git is?a free and open source distributed code management and Version control system?that is distributed under the GNU General Public License version 2. In addition to software version control, Git is used for other applications including configuration management and content management.

Git is a speedy that can handle projects of any size, from small to very large ones. Git provides cheap local branching, convenient staging areas, and multiple workflows. It is free, open-source software that lowers the cost because developers can use Git without paying money. It provides support for non-linear development. Git enables multiple developers or teams to work separately without having an impact on the work of others.

2. What is difference Between Main Branch and Master Branch??

There is no difference between main and master branch in git. Main or Master branch is a default branch when you create a repository. GitHub now use?main?as a it's?default branch. while others still use master branch as a default branch.

3. Can you explain the difference between Git and GitHub?

The difference between Git and GitHub:?Git is a widely used version control system that lets you manage and keep track of your code.?GitHub is a cloud-based hosting service that lets you manage your Git repositories. With GitHub, you can back up your personal files, share your code, and collaborate with others.

4. How do you create a new repository on GitHub?

  1. In the upper-right corner of any page, use the drop-down menu, and select New repository.
  2. Type a short, memorable name for your repository. ...
  3. Optionally, add a description of your repository. ...
  4. Choose a repository visibility. ...
  5. Select Initialize this repository with a README.
  6. Click Create repository.

5. What is difference between local & remote repository? How to connect local to remote?

Git local repository is?the one on which we will make local changes, typically this local repository is on our computer.

Git remote repositories are hosted on a server that is accessible for all team members.?

A git?remote command?is used to make the remote connections such as connecting a Git local repository with GitHub remote repository.

git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPOSITORY

git push origin master

Tasks:

1.Set your user name and email address, which will be associated with your commits.

No alt text provided for this image

2.Create a repository named "Devops" on GitHub

No alt text provided for this image

3. Connect your local repository to the repository on GitHub.

The?git init?command transforms the current directory into a Git repository.

No alt text provided for this image

Here use?git remote?command to connect local repository to the GitHub repository.

git remote add origin <URL_from_GitHub_repository>

No alt text provided for this image

4.Create a new file in Devops/Git/Day-02.txt & add some content to it.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

5.Push your local commits to the repository on GitHub

Git push?: The git push command is?used to upload local repository content to a remote repository.

git push origin master

No alt text provided for this image
No alt text provided for this image

Thank You for reading this Article.

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

Deepika D的更多文章

  • Day 28 Task: Jenkins Agents

    Day 28 Task: Jenkins Agents

    Jenkins Master (Server) Jenkins’s server or master node holds all key configurations. Jenkins master server is like a…

    4 条评论
  • Day 27 Task: Jenkins Declarative Pipeline with Docker

    Day 27 Task: Jenkins Declarative Pipeline with Docker

    Use your Docker Build and Run Knowledge docker build - you can use sh docker build . -t in your pipeline stage block…

    1 条评论
  • Day 26 Task: Jenkins Declarative Pipeline

    Day 26 Task: Jenkins Declarative Pipeline

    One of the most important parts of your DevOps and CICD journey is a Declarative Pipeline Syntax of Jenkins Some terms…

  • Day 24 Task: Complete Jenkins CI/CD Project

    Day 24 Task: Complete Jenkins CI/CD Project

    Let's make a beautiful CI/CD Pipeline for your Node JS Application Task-01 Fork this repository: Create a connection to…

  • Day 23 Task: Jenkins Freestyle Project for DevOps Engineers.

    Day 23 Task: Jenkins Freestyle Project for DevOps Engineers.

    What is CI/CD? CI or Continuous Integration is the practice of automating the integration of code changes from multiple…

  • Day-22 : Getting Started with Jenkins

    Day-22 : Getting Started with Jenkins

    1. What is Jenkins? Jenkins is an open source continuous integration-continuous delivery and deployment (CI/CD)…

  • Day 21 Task: Docker Important interview Questions.

    Day 21 Task: Docker Important interview Questions.

    Docker Interview Docker is a good topic to ask in DevOps Engineer Interviews, mostly for freshers. One must surely try…

    6 条评论
  • Day 20 Task : Docker commands Cheat-Sheet

    Day 20 Task : Docker commands Cheat-Sheet

    Docker commands: # docker build: Builds an image from a Dockerfile. docker build [OPTIONS] PATH | URL | docker build…

  • Day 19 Task: Docker for DevOps Engineers

    Day 19 Task: Docker for DevOps Engineers

    Docker-Volume Docker allows you to create something called volumes. Volumes are like separate storage areas that can be…

    3 条评论
  • Day 18 Task: Docker for DevOps Engineers

    Day 18 Task: Docker for DevOps Engineers

    Docker Compose Docker Compose is a tool that was developed to help define and share multi-container applications. With…

社区洞察

其他会员也浏览了