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

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

Here I have completed the task related to how to connect Git and GitHub.

Day 9 Tasks :

What is Git and why is it important?

  • Git is a version control system used to manage source code and track changes made to it. It allows multiple developers to collaborate on a project by keeping a history of changes to the code and allowing them to work on different versions of the code in parallel.

  • It provides features such as distributed architecture, branching, and merging, which make it easier to manage code development and collaborate effectively.

  • Overall, Git is important because it enables efficient and effective software development by providing a centralized repository of code, version control, and collaboration tools.

What is the difference Between Main Branch and Master Branch?

  • The difference between "main" and "master" branches is purely a matter of naming convention. Functionally, they work the same way and can be used interchangeably.

  • Both branches represent the main line of development in the repository and are used to track the latest stable version of the code.

Can you explain the difference between Git and GitHub?

  • Git is a version control system that allows you to manage and track changes to your source code. It is a software tool that you install on your local computer and use to manage your code repositories.

  • GitHub is a web-based platform that provides a centralized location for hosting Git repositories. It is a web-based service that allows you to host your Git repositories and collaborate with others on your code.

How do you create a new repository on GitHub?

step 1:

imageedit_3_4218002644-0000

step 2:

new repo on github

Now hit enter to Create Repository. Thus how we created our repository on GitHub.

What is the difference between local & remote repositories? How to connect local to remote?

  • A local repository is a copy of a codebase that is stored on your local machine. It includes all the files, directories, and version control information related to a particular project.

  • In contrast, a remote repository is a version of the same codebase that is stored on a remote server, typically in the cloud.


Task 1:

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

username  email


Task 2:

Create a repository named "Devops" on GitHub.

devOps folder


Connect your local repository to the repository on GitHub.

Screenshot from 2023-03-15 19-26-37


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

Screenshot from 2023-03-15 19-38-23

Screenshot from 2023-03-15 19-38-52

Screenshot from 2023-03-15 19-39-05


Push your local commits to the repository on GitHub

Screenshot from 2023-03-15 19-39-27


Happy Learning :)

Did you find this article valuable?

Support DevOps by becoming a sponsor. Any amount is appreciated!