Table of contents
- ๐ถ What is Git and why is it important?
- ๐ถ What is the difference Between Main Branch and Master Branch?
- ๐ถ Can you explain the difference between Git and GitHub?
- ๐ถ How do you create a new repository on GitHub?
- ๐ถ What is the difference between local & remote repositories? How to connect local to remote?
- ๐ถ Tasks 1: Set your user name and email address, which will be associated with your commits.
- ๐ถ Tasks 2:
- ๐ถ Tasks 2. a: Create a repository named "Devops" on GitHub
- ๐ถ Tasks 2. b: Connect your local repository to the repository on GitHub.
- ๐ถ Tasks 2. c: Create a new file in Devops/Git/Day-02.txt & add some content to it.
- ๐ถ Tasks 2.d: Push your local commits to the repository on GitHub
๐ถ What is Git and why is it important?
GIT, which stands for Global Information Tracker, is a widely-used version control system commonly used for software development and other collaborative projects.
Git is important in modern software development for several reasons:
1. Version Control.
2. Collaborative Development.3. Branching and Merging.
4. Code Review and Collaboration.
5. Safety and Data Redundancy.
6. Open Source and Community Collaboration.
7. Flexibility and Compatibility.
8. Continuous Integration and Continuous Delivery.๐ถ What is the difference Between Main Branch and Master Branch?
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 is a version control system and GitHub is a service.
Git is a command-line tool while GitHub is a Graphical user interface.
Git is open-source licensed while GitHub includes a free-tier and pay-for-use tier.
Git is a version control system to manage source code history and GitHub is a hosting service for Git repositories.๐ถ How do you create a new repository on GitHub?
Creating a new repository (repo) on GitHub is a straightforward process. Here are the steps to create a new repository:
Log in to GitHub: If you don't have a GitHub account, sign up for one at https://github.com/join. If you already have an account, log in using your credentials.
Go to Your GitHub Dashboard: After logging in, you will land on your GitHub dashboard.
Create a New Repository: In the top-right corner of the GitHub dashboard, click on the "+" icon, and then select "New repository" from the dropdown menu.
๐ถ What is the difference between local & remote repositories? How to connect local to remote?
The local branch exists on the local machine and can be seen only by the local user. The remote branch is a branch in a remote location.
To connect local to remote use the following steps:
1. Create the Repository: Once you've filled in the details, click the "Create Repository" button. Your new repository will be created, and you'll be redirected to its page.
2. Set Up the Repository: On your repository page, you'll find the repository's URL, which we have to clone the repository to your local machine using Git. we can also customize the repository's settings, add collaborators, and manage various aspects of the repository from this page.
3. Clone the Repository: To start working on your project locally, we have to clone the repository to our local machine using the git clone
command. The repository URL is available on the repository page.
๐ถ Tasks 1: Set your user name and email address, which will be associated with your commits.
Setting your commit email address on GitHub
In the upper-right corner of any page, click your profile photo, then click Settings.
In the "Access" section of the sidebar, click
Emails.
In "Add email address", type your email address and click Add.
In the "Primary email address" dropdown menu, select the email address you'd like to associate with your web-based Git operations.
To keep your email address private when performing web-based Git operations, select Keep my email addresses private.
๐ถ Tasks 2:
๐ถ Tasks 2. a: Create a repository named "Devops" on GitHub
๐ถ Tasks 2. b: Connect your local repository to the repository on GitHub.
๐ถ Tasks 2. c: Create a new file in Devops/Git/Day-02.txt & add some content to it.
๐ถ Tasks 2.d: Push your local commits to the repository on GitHub
In conclusion, GitHub is a powerful platform that revolutionizes the way developers collaborate, manage, and share their code. It serves as a centralized hub for version control, allowing teams to work together seamlessly on projects of any size.
Stay in the loop with my latest insights and articles on cloud โ๏ธ and DevOps โพ๏ธ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).
Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.
Linux Devops #Devopscommunity #90daysofdevopschallenge