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 distributed version control system that tracks changes to files and coordinates work among multiple people. It is important because it allows teams to collaborate on projects effectively, keep track of changes made by different team members, revert to previous versions of files if needed, and maintain a history of changes for audit and accountability purposes.
  2. What is the difference Between Main Branch and Master Branch? TThe main difference between the "main" branch and the "master" branch in Git is largely semantic. In response to concerns about the term "master" having negative connotations, some projects and platforms, including GitHub, have started using "main" as the default branch name. Functionally, they serve the same purpose as the default branch in a Git repository.
  3. Can you explain the difference between Git and GitHub? Git is a version control system that tracks changes to files and coordinates work among multiple people, while GitHub is a web-based platform that provides hosting for Git repositories. Git is the tool used to manage versions of files locally, while GitHub allows for sharing and collaborating on Git repositories online. In summary, Git is the technology, and GitHub is the platform that uses Git technology.
  4. How do you create a new repository on GitHub? To create a new repository on GitHub, follow these steps:Log in to your GitHub account.Click on the "+" icon in the upper right corner and select "New repository."Enter a name for your repository, add a description (optional), and choose whether it will be public or private.Click on the "Create repository" button.
  5. What is the difference between a local and remote repository? How to connect local to remote? A local repository is a copy of a Git repository that resides on your computer, while a remote repository is hosted on a remote server, such as GitHub. The local repository is where you work on your files and make changes, while the remote repository is where you push your changes to share them with others. To connect your local repository to a remote one, you can use the command git remote add origin <remote repository URL>. This command tells Git to add a remote repository with the name "origin" and the specified URL. After adding the remote, you can push your changes to the remote repository using git push origin <branch name>.

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

Utsav Bayaskar的更多文章

社区洞察

其他会员也浏览了