5 octubre, 2024

How does GitHub work? [Guía para novatos]

If you are interested in web development and have used version control systems like Git. In this post you will have a guide for newbies to understand how GitHub works and thus expand your knowledge in web developmentin addition to adding a new tool in your daily work with Git for a better user experience.

What is GitHub?

GitHub is a project hosting platform that uses the collaboration-focused Git version control system. This platform allows you and other developers to work together on projectsit also offers you the possibility of creating code repositories and saving them in the cloud safely from anywhere.

The main function of GitHub is to host your code repositories, giving you very useful tools for teamwork within each project. In addition to this, you can help improve others’ software. In order to achieve this goal, GitHub gives you functionalities to make a fork and request pulls.

A fork It is the cloning of a foreign repository (generate a copy in your GitHub account), to eliminate a bug or modify things in it. And so after making the modifications, you can send a pull to the project owner.

Tools offered by GitHub

Today, GitHub is much more than a code storage service and working repositories. Since its creation in 2008, GitHub has grown and evolved, becoming an entire community for developers and programmers., in many cases it is considered the Facebook for geeks. That is why they offer several tools for teamwork. These are some of them:

A kind of Wikiwhich guides developers to maintain or fix the different versions of the page. A issue tracking system which allows team members to detail and reveal problems in the software, as well as a suggestions section to comment on the changes that they consider best for the evolution of the software. code review toolin this you can add annotations at any point in a file and discuss certain changes that are made in a file. commit specific. A branch viewer where the progress made in the different branches created in our repository is compared.

Create a repository on GitHub

Since you have understood a little how GitHub works and we have given you one of your most important toolsthe next step in our guide is to learn how to create a repository.

A repository is usually used to organize a single project. The data that can be stored in repositories are files, folders, images, videos and data sets, anything that is necessary for your project. Repositories often include a file README, This file has information about your project. GitHub makes everything easy by adding one at the same time you create your new repository.

These are the steps to create a repository:

In the top right corner of your page, use the dropdown menu and select New repository.In the box Repository nameenter the name you want to give it.In the box Descriptionwrite a simple description.Select Add a file README.Click on Create repository.

Create a branch

Branches allow you to have multiple versions of a repository at once. By default, your repository has a branch mainthis is considered the definitive branch. You can use branches to experiment and make edits before sending them to mainwhen you create one you are making a snapshot copy of the branch main just as it was at that time.

This is the step by step to create a branch on GitHub:

Click on the tab Code (whatever name you gave it) from your repository. Click the drop-down menu at the top of the file list that says main.Type the name you want for the branch in the text box.Click Create branch: (the name you chose) from main.Now you have two branches, the branch main and the branch you created. Both branches are exactly the same, but as you add changes, the second branch will look edited while the branch main will remain intact.

Where to continue?

Now that you know how GitHub works, Do you want to continue acquiring knowledge in the area? With our Web Development Bootcamp you will be able to master this and other tools and technologies such as JavaScript, React, Microservices and even server deployment in less than 7 months. Learn more!

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *