GitLab

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

GITLAB VS GITHUB

COMPLETE GUIDE FOR DEVELOPERS


ENGLISH VERSION

By Mosché MAMPUYA
INTRODUCTION
In today's digital landscape, collaboration and efficiency are essential
elements for software developers. GitLab and GitHub have emerged as indispensable
tools in project management, offering robust solutions for code change tracking,
team collaboration, and automation of deployment processes.
These two platforms not only facilitate version control through Git but also
integrate a multitude of features that enhance team productivity. Whether it's
managing open-source projects, coordinating work within distributed teams, or
automating repetitive tasks, GitLab and GitHub play a central role in the modern
workflow of developers.

By Mosché MAMPUYA Page 2


INTRODUCTION (CONTINUED)

The importance of these tools goes beyond their ability to store code; they
also foster a culture of collaboration, innovation, and continuous learning. By
allowing developers to share their work, review others' code, and contribute to
common projects, GitLab and GitHub strengthen the software development
ecosystem while making processes more transparent and accessible.
In this book, we will explore in detail these two platforms, their distinctive
features, as well as their commonalities, to help computer scientists and enthusiasts
choose the tool that best suits their needs.

By Mosché MAMPUYA Page 3


I. GIT
Before diving into the details of GitLab and GitHub, it is essential to
understand their common foundation: Git. Think of Git as the universal language
of source code management, the technological backbone upon which these
collaborative development platforms rest.
Git is a distributed open-source version control system that allows
development teams to effectively manage changes to source code over time. It
provides the ability to create multiple local copies of a project, enabling
developers to work simultaneously on different versions without interfering with
one another. Page 4
II. GITLAB

GitLab is an open-source DevOps platform that allows developers to


manage the entire lifecycle of their software projects, from planning to
production. It offers comprehensive features such as version control, continuous
integration (CI), and continuous deployment (CD), thereby facilitating
collaboration among teams and automating development processes.

By Mosché MAMPUYA Page 5


III. GITHUB

GitHub is also a platform based on Git, primarily recognized for its user-
friendly interface and strong community support. It focuses on collaborative
development and hosting open-source projects, while integrating features such as
pull requests and issue tracking.

By Mosché MAMPUYA Page 6


The main objective of these two tools is to enhance developers'
productivity by simplifying source code management and promoting effective
collaboration within teams. They also help ensure code quality through reviews
and rigorous tracking of changes.

By Mosché MAMPUYA Page 7


IV. CONVERGENCES BETWEEN GITLAB AND
GITHUB
1. Based on Git: Both platforms rely on the Git version control system, enabling
efficient source code management and facilitating migration between them.
2. Collaboration Features: GitLab and GitHub provide collaboration tools, such as
Merge Requests for GitLab and Pull Requests for GitHub, allowing developers to
propose changes.
3. Issue Tracking: Both platforms integrate issue management systems, enabling
teams to track bugs, requested features, and other development-related tasks
directly.
4. Active Community: GitLab and GitHub have large user communities, providing
access to a vast repository of open-source projects and learning resources.
Page 8
5. Hosting Options: Both tools offer free versions, allowing users to get started at
no cost while providing paid options for advanced features.

By Mosché MAMPUYA Page 9


MAIN DIFFERENCES
1. CONTINUOUS INTEGRATION / CONTINUOUS DELIVERY
(CI/CD)
GitLab offers a complete and integrated CI/CD solution, facilitating automated
deployment without the need for external tools. GitHub, on the other hand,
requires the use of third-party tools like Travis CI or CircleCI for continuous
integration, although GitHub Actions provides automation solutions.

By Mosché MAMPUYA Page 10


2. HOSTING

GitLab: Allows free self-hosting, offering flexibility for businesses wanting to


control their data.
GitHub: Primarily offers a SaaS model, with self-hosting available only in paid
plans.

3. OPEN SOURCE MODEL


GitLab: Has an open core model, with a free Community Edition and advanced features in
the Enterprise Edition.
GitHub: Although it contains open-source code, it is not fully open source, which limits
certain customizations.
By Mosché MAMPUYA Page 11
4. WORKFLOW AND SPEED
GitLab emphasizes reliability with more rigorous deployment processes, making it
ideal for projects that require strict validation. GitHub, in contrast, promotes rapid
and agile development, allowing for frequent and quick deployments through a
simplified workflow.

5. USER MANAGEMENT AND PERMISSIONS


GitLab: Offers advanced options for defining and modifying user permissions
based on their roles.
GitHub: Has more limited user management options, which can restrict access
customization.

By Mosché MAMPUYA Page 12


If you enjoyed this article, feel free to give it a "like." Your support is invaluable and
motivates us to create more quality content.

🗨 Share Your Thoughts!


We would love to hear your opinion. Leave a comment below to share your ideas
and experiences. Every piece of feedback is an opportunity to exchange and learn
together.

🔄 Spread the Word!


If you think this article might interest others, don't hesitate to republish and share it
on your social media. Together, let's grow our community.
Thank you for your engagement and support! ❤️ Don't forget to subscribe!

By Mosché MAMPUYA Page 13


V. SPECIFIC FEATURES OF GITLAB AND
GITHUB

By Mosché MAMPUYA Page 14


GITLAB
Version Control: Allows tracking changes to source code, with features such as
branches and merge requests to facilitate collaboration.
Integrated CI/CD: GitLab offers automated CI/CD pipelines for testing and
deploying code, reducing time to production.
Issue Management: A system for tracking issues that allows organizing,
prioritizing, and monitoring tasks, with an interactive dashboard to visualize
project progress.

By Mosché MAMPUYA Page 15


GITLAB
Integrated Security: Tools for automated security analysis and compliance
management, ensuring that the code meets security standards.
Advanced Collaboration: Code review features with comments, integrations with
communication tools like Slack, and project management using agile methods
such as Scrum and Kanban.

By Mosché MAMPUYA Page 16


GITHUB

Version Control: Like GitLab, GitHub uses Git for tracking changes, allowing users
to manage their projects effectively.
Pull Requests: Enables developers to propose changes to the code and engage in
discussions around these changes before integration.

By Mosché MAMPUYA Page 17


GITHUB

GitHub Actions: An automation tool that allows executing custom workflows for
CI/CD, although it is less integrated than GitLab's solution.
Project Management: Tools for tracking tasks and issues, with a simple interface
to organize team work.
Community and Open Source: Strong community support with a vast library of
open-source projects, facilitating learning and collaboration among developers.

By Mosché MAMPUYA Page 18


VI. ESSENTIAL COMMANDS FOR GITLAB
AND GITHUB

By Mosché MAMPUYA Page 19


User Configuration:
bash
git config --global user.name "Your Name" # Sets the user's name.
git config --global user.email "your.email@example.com" # Sets the user's email.
Initialize a Repository:
bash
git init # Creates a new Git repository.
Clone a Repository:
bash
git clone <url> # Clones a remote repository to your local machine.
Add Files:
bash
git add <file> # Adds a file to the index for the next commit.
git add . # Adds all modified files in the current directory.
Page 20
Validate Changes:
bash
git commit -m "Commit message" # Commits the changes with a descriptive
message.
Check Repository Status:
bash
git status # Displays modified files and those pending validation.
Push Changes to Remote Repository:
bash
git push origin <branch> # Pushes local commits to the specified branch of the
remote repository.
Retrieve Changes from Remote Repository:
bash
git pull # Fetches and merges changes from the remote repository into the
current local branch.
Manage Branches:
bash
git branch <branch-name> # Creates a new branch.
git checkout <branch-name> # Switches to the specified branch.
git merge <branch-name> # Merges the specified branch into the current
branch.
Delete a Branch:
bash
git branch -d <branch-name> # Deletes the specified branch.

By Mosché MAMPUYA Page 22


KEY CONCEPTS OF GIT
1.COMMIT
A commit is an operation that records changes made to the code in the
repository's history. Each commit creates a snapshot of the project at a specific
point in time, allowing you to revert to that version if necessary. Commits are
accompanied by a descriptive message that explains the changes made, making it
easier to understand the project's evolution.

By Mosché MAMPUYA Page 23


2. MERGE
Merging is the process by which changes from one branch are integrated into
another branch. There are two types of merges:
a. Fast-Forward Merge: If the target branch has not been modified since the
creation of the branch to be merged, Git simply moves the pointer of the target
branch to include the commits from the merging branch.
b. Three-Way Merge: If both branches have diverged, Git uses a merge commit
that combines changes from both branches while preserving their histories. This
allows for a clear record of contributions and code evolution.

By Mosché MAMPUYA Page 24


3. PUSH
The push command is used to send local commits to a remote repository (such as
GitHub or GitLab). This allows developers to share changes with others and
update the central repository with the latest locally made changes. The typical
syntax is git push origin <branch>, where <branch> is the name of the branch
you want to update. These concepts are fundamental for understanding how Git
operates and how it facilitates collaboration among developers while ensuring
effective version management of source code.

By Mosché MAMPUYA Page 25


CONCLUSION
In the world of modern software development, Git, along with platforms like
GitLab and GitHub, plays a crucial role in code management and team collaboration.
With robust features such as version control, continuous integration, and project
management tools, these platforms enable developers to work more efficiently and
organized.
By understanding key concepts like commit, merge, and push, developers can fully
leverage Git's capabilities to manage their projects. Whether you are a seasoned
programmer or a passionate beginner, mastering these tools and concepts will pave
the way for successful collaboration and continuous improvement of your
development skills.

By Mosché MAMPUYA Page 26


This book aims to provide you with a comprehensive understanding of GitLab
and GitHub, so you can choose the platform that best suits your needs and optimize
your development workflow. By exploring these tools, you will be better prepared to
tackle the challenges of modern software development and contribute effectively to
collaborative projects.

If you enjoyed this little book, feel free to contact us to discover our wide
selection of books on various topics. In addition, we offer a range of services such as
article writing assistance, as well as advertising and promotional article writing. To
explore our extensive selection of books on various subjects, follow us on our
LinkedIn account: Mosché Mampuya (créateur de contenu multidisciplinaires).

By Mosché MAMPUYA Page 27


CONTACT US
+243-89-171-00-22

schemampuya@gmail.com

Lubumbashi/Haut-Katanga/RDCongo

You might also like