GitHub

GitHub is a company that offers a cloud-based Git repository hosting service. It primarily makes using Git for version control and collaboration much easier for individuals and teams. 

GitHub's interface is very user-friendly, so even novice coders can take advantage of Git. Using Git without GitHub usually requires a bit more technical knowledge.

GitHub is so user-friendly that some people even use GitHub to manage other types of projects like writing books.

In addition, anyone can register for a public code repository for free and host their codes there; this situation makes GitHub particularly popular in open source projects.

 

What is a GitHub Repository?

A GitHub Repository contains all the files of your project and the revision history of each file. You can discuss and manage your project's work within the pool.


A Quick Look at the GitHub Interface

To gain a basic understanding of what the GitHub interface looks like, you can view the code and file organization hosted in WordPress's Github repository here .

From here, you can view various branches being worked on and also when someone made an update. 

After making changes to the codes in this repository, you can send this code to the code repository by creating a pull request. A pull request asks the person responsible for the code (team leader, scrum master, etc.) to add your code to the main code directory. Moreover, it helps that person to see exactly what you have changed in the code.

 

How to use GitHub in 7 Steps?

GitHub seems complicated at first glance, but understanding a few basics will help you get started easily. You need to complete these few steps first to use GitHub. So let's start, how to use GitHub?

 

1. Register for GitHub

You will need a GitHub account to use GitHub. From here, you can create a free GitHub account and start using GitHub right away. With a free account, you can access an unlimited level of public and private repositories. Also, you have bug tracking and project management features. The only disadvantage is that only three collaborators are allowed for private repositories. 

 

2. Install Git

We had mentioned that GitHub works on Git. To install Git on your computer, you can read this write-up.

 

3. Create a Repository

First, you need to know how to create a repository to do anything on GitHub. Simply, a repository stores everything related to a particular project, including files, images, spreadsheets, datasets, and videos, and is usually divided into many files. 

To create a new repository, you should click the “new repository” button in the top right corner. Then you can name your repository, add a short description, and check the box that says "start this repository with a README". Finally, click on the "create repository" button. At this stage, you can upload your project to GitHub.

 

4. Create a Branch

Projects are multifaceted and require many program versions while building. Branching allows you to edit multiple unique versions of a repository at the same time. Your repository has a definitive branch named master. You can work on several different branches to make edits before making a commit to the master branch.

When starting a new branch, it will remain as a copy of the main branch until you edit it to make new changes. A branch usually goes through many steps and approvals before it is merged with the master branch. To start a new branch in GitHub, go to your new repository, click on the dropdown menu that says "branch: master", write a branch name (like EDITME edits), and then press the "create branch" button. Branching is the ideal method to add new features or fix bugs.

 

5. Make Changes in a Branch and Commit

To make changes in a branch on GitHub, go to the code view of your newly created branch. Click on the file you want to change, then click on the pencil icon at the top right, make necessary edits, write a commit message to explain your changes, and then click “accept changes”.

Each saved change is called a commit. Each individual commit has its own commit message giving more details of why a particular change was made. Commit messages provide a history of changes and help other contributors understand how the project has changed over time.

 

6. Create a Pull Request

You must open a pull request to merge any branch with another person's branch. A pull request is GitHub's method of informing the parties concerned about your request to include your changes in the relevant branch. A pull request will show the differences in content between branches in red and green. You can create a pull request after completing a commit. For best results, when sending a pull request, you can use the "@" feature to mention specific people you need feedback from.

To open a pull request, you will go to the "pull request" tab and press the button that says "new pull request". Then, in the “example comparisons” box, find the branch you made and compare it with the master. Make sure you like the changes, and then click the "create pull request" button. Give your pull request a title and briefly explain the changes. Click "create pull request" to finish.

 

7. Merge Your Pull Request

Merging your pull request with the master branch is something that you might need to forward to the project manager for approval. Still, for the sake learning, you can try doing this yourself. Just press the "merge pull request" button, choose "confirm merge", and delete the branch you merged after it is included in the master.

 

Github vs Gitlab vs Bitbucket

Generally, developers agree that GitLab and GitHub have the best interface. Many developers prefer GitHub because GitHub is more popular among developers and they are more used to the site navigation. However, teams using Jira naturally prefer BitBucket because it provides the advantage of seamless integration with the Atlassian ecosystem.

Here's a brief summary of each platform's interface:

GitHub: There is a lot of guidance and guide content available, quick access to basic functions, the interface is minimalist and easy to understand. The disadvantages are the lack of native integrations with Jira and the lack of advanced CI features.

BitBucket: The interface can be confusing, but as the platform has become more popular, a lot more guide resources are being produced. Teams using Jira often prefer BitBucket because it makes the project much more trackable.

GitLab: GitLab does not have as established a structure as its competitors, so interface guides and manuals are still lacking. But the interface design is very well organized and advanced plugins are easy to find.
 

In Conclusion

According to these information, using GitHub, GitLab or BitBucket is up to your preference. While GitLab is recommended for larger companies, BitBucket and GitHub are recommended for personal, small and medium sized companies.

If you want to learn more about Git and improve your skills by attending professional workshop events, you can follow our events page.

More work, less stress! 🍅 Manage Your Time with the Pomodoro Timer! Try Free!