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

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

🖊️What is Git and why is it important?

Git is an open-source distributed version control system. It is designed to handle minor to major projects with high speed and efficiency. It is developed to coordinate the work among the developers. The version control allows us to track and work together with our team members at the same workspace.

Version Control, Collaborative Development, Branching and Merging.
Code Review and Collaboration, Safety and Data Redundancy.
Open Source and Community Collaboration, Flexibility and Compatibility, Continuous Integration and Continuous Delivery.

🖊️What is the difference Between Main Branch and Master Branch??

  1. The term "master" has been widely used in computing and software development for decades. However, it has come under scrutiny for its association with slavery and other oppressive historical contexts, leading to calls for more inclusive terminology.

    In response to concerns about the term "master," many open-source communities, organizations, and developers have adopted "main" as the default branch name or renamed their existing "master" branches to "main."

    The choice of "main" as an alternative branch name aims to promote a more inclusive and respectful language, avoiding terms that may have negative connotations

    🖊️Can you explain the difference between Git and GitHub?

Git:

  • Git is a distributed version control system that allows developers to manage their code repositories locally on their computers.

  • It keeps track of changes, manages branches, and allows collaboration among developers.

  • Git operates entirely offline, and developers can work with it without the need for a centralized server.

GitHub:

  • GitHub is a web-based platform that provides hosting services for Git repositories.

  • It allows developers to store their Git repositories remotely on the GitHub servers.

  • GitHub offers a user-friendly web interface for managing repositories, collaborating with others, and reviewing code changes through pull requests.

  • It enhances collaboration, provides issue tracking, and serves as a social platform for developers to showcase their projects.

  • 🖊️How do you create a new repository on GitHub?

  1. Sign in to your GitHub account (if you don't have one, sign up first).

  2. Click on the "+" sign in the top right corner of the GitHub page and select "New repository."

  3. Provide a name for your repository. Choose a descriptive and meaningful name that represents your project.

  4. Optionally, add a description to provide more details about your repository.

  5. Select the repository's visibility: Public (visible to everyone) or Private (visible only to you and collaborators you grant access to).

  6. You can choose to initialize the repository with a README file, which is useful to provide an overview of your project.

  7. You can also add a .gitignore file to specify which files should be ignored by Git.

  8. If you're working on an existing project and want to push it to the new repository.

    🖊️What is the difference between local & remote repository? How to connect local to remote?

Local Repository:

  • A local repository is a Git repository that exists on your computer.

  • It contains all the version history of your project, including code, commits, branches, and project files.

  • You can work with the local repository even without an internet connection.

  • It serves as the working copy of your code, where you make changes and experiment with new features.

Remote Repository:

  • A remote repository is a Git repository that exists on a server, often provided by a hosting service like GitHub, GitLab, or Bitbucket.

  • It acts as a central hub where developers can collaborate, share code, and contribute to a common codebase.

  • Multiple developers can push their local changes to the remote repository, and others can pull those changes to their own local repositories.

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

  • Create a repository named "Devops" on GitHub

  • Connect your local repository to the repository on GitHub.

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

  • Push your local commits to the repository on GitHub

If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! 🚀 #devops #90daysofdevops