More about Git and GitHub

DipanshuDipanshu
3 min read

Difference between Git and GitHub

Git and GitHub are two closely related technologies, but they are not the same thing.

Git is a distributed version control system (VCS) that allows developers to track changes in their code over time. It is a command-line tool that can be used to create and manage local repositories, which are snapshots of a project's code at a specific point in time. Git also allows developers to share their code with others and collaborate on projects.

GitHub is a web-based hosting service for Git repositories. It provides a user interface for managing repositories, tracking changes, and collaborating with others. GitHub also offers several features that make it easy to share code, such as issue tracking, pull requests, and code review.

The difference between the Main Branch and the Master Branch

The main difference between the main branch and the master branch is their naming convention. Git repositories used to have a default branch named master, but in 2020, the Git project announced that it was changing the default branch name to main. This was done in response to feedback from the community that the term "master" has a negative connotation in some cultures.

Other than the name, there is no technical difference between the main branch and the master branch. Both branches are used to store the stable and deployable code for a project. Developers typically create new branches from the main branch to work on new features or bug fixes. Once the changes are complete and tested, the developer merges the branch back into the main branch.

To create a new repository on GitHub, follow these steps:

  1. Go to GitHub: https://github.com/ and sign in to your account.

  2. Click the + button in the top right corner of the page and select New Repository.

  3. Enter a name for your repository and an optional description.

  4. Choose a repository visibility. Public repositories can be viewed by anyone, while private repositories can only be viewed by people you invite.

  5. Click Create Repository.

If you want to initialize your repository with a README file, select the Initialize this repository with a README checkbox. A README file is a text file that provides information about your repository, such as its purpose, how to use it, and any other relevant information.

Once your repository is created, you can start adding files to it. You can do this by uploading files from your computer or by cloning the repository to your local machine and then adding files to the local clone.

Once you have added files to your repository, you can commit them and push them to the remote repository on GitHub.


Follow For More

#git #github #gitandGithub #linux #devops #cloud #DevOps #CloudComputing #LinuxFile

#operatingsystem #AWS #90daysofdevops #kubernetes #90DaysOfDevOs #90daysHardChallenge #TWS #TrainWithShubham #Docker #community

1
Subscribe to my newsletter

Read articles from Dipanshu directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Dipanshu
Dipanshu

As a Cloud / DevOps Engineer , I'm passionate about transforming businesses by architecting and scalable cloud solutions. With a strong foundation on AWS , Docker , Kubernetes , Jenkins , Terraform . My expertise in designing and managing cloud environments . Let's collaborate to take your digital journey to new heights with cloud technology. ๐Ÿš€ #CloudEngineering