Version control for programmers and web developers
What Is Git?
A detailed explanation of Git — what repositories, branches and commits are, what GitHub and GitLab are, and how developers use Git to deploy and maintain websites.
What is Git?
Git is a distributed version control system (DVCS) that tracks changes in code over time. It allows multiple developers to work in parallel, builds a history of all changes, enables branching for feature work and rollback to previous versions. Core commands: init, clone, add, commit, push, pull, branch, merge. Platforms: GitHub, GitLab, Bitbucket. BeoHosting cPanel has Git Version Control for auto-deploying code to the server via a webhook.
- Git = code version control
- Repositories, branches, commit, push
- GitHub/GitLab/Bitbucket platforms
- BeoHosting cPanel: Git Version Control
- Auto-deploy with a webhook
BeoHosting Team
10+ years of experience — Web hosting and infrastructure specialists
- Git
- GitHub
- GitLab
- Bitbucket
- CI/CD
- Version control
- Webhook deploy
- Developer workflow
Last updated:
What is Git and why do all developers use it?
Git is a distributed version control system (VCS) created by Linus Torvalds in 2005 — the same person who created Linux. Git tracks every change in your code and lets you return to any previous version at any moment.
Imagine you are writing a document and want to save every version — Git does that automatically for your code. Every change is recorded with a description, an author and a timestamp. If something goes wrong, you can instantly revert to the last correct version.
Git is today the industry standard — used by over 90% of developers worldwide. From small freelance projects to Google, Facebook and Microsoft, Git is the foundation of every serious development process. With BeoHosting VPS hosting, you can set up Git-based deployment for automatic deployment of your site.
Core Git concepts
Understanding these 6 concepts is enough to start working with Git.
Repository (Repo)
A folder that contains your project and the complete history of all changes. It can be local (on your computer) or remote (on GitHub/GitLab). Each project usually has one repository.
Commit
A snapshot of your code at a particular moment. Each commit contains the changes, a message describing them, an author and a timestamp. Commits form the "timeline" of your project.
Branch
A parallel line of development. The main code is on the "main" branch. When you want to add a new feature, you create a new branch, make changes, and when finished, merge it back into main.
Merge
Combining one branch into another. When you finish work on a new feature in your branch, the merge combines it with the main code. Git automatically resolves most conflicts.
Pull Request (PR)
A request to merge your branch into the main branch. The team can review your changes, comment, request fixes and finally approve the merge. Key to teamwork.
Clone / Fork
Clone makes a copy of the repository on your computer. Fork makes a copy on your GitHub account. Fork is used for contributions to open-source projects — you fork, make changes, then send a Pull Request.
GitHub, GitLab and Bitbucket — Git hosting platforms
These platforms host your Git repositories in the cloud and add features for teamwork.
GitHub
100M+ usersThe most popular platform with 100+ million users. Owned by Microsoft. Ideal for open-source projects, portfolios and collaboration. Free for public and private repositories.
GitLab
30M+ usersA complete DevOps platform with built-in CI/CD, a container registry and monitoring. Popular in enterprise environments. It can be installed on your own server (self-hosted).
Bitbucket
10M+ usersAtlassian's platform that integrates excellently with Jira, Trello and Confluence. Popular among teams that already use Atlassian tools. Free for small teams (up to 5 users).
How developers use Git to deploy a website
Git-based deployment is a modern approach that automates putting code onto the server.
Local development
The developer writes and tests code on their own computer. They use Git to track all changes.
Commit and Push
When satisfied with the changes, the developer commits the code and pushes it to GitHub/GitLab.
Code Review
The team reviews the changes through a Pull Request. They comment, suggest improvements and approve the merge.
CI/CD Pipeline
Automated tests run. If all tests pass, the code is automatically deployed to the staging/production server.
Deploy to the server
The new code is live on the server. If a problem appears, Git enables an instant rollback to the previous version.
Git-based deployment requires a server with SSH access — BeoHosting VPS hosting gives you full control over the server with root access, ideal for setting up a CI/CD pipeline and automated deployment.
The most important Git commands to start with
These 10 commands cover 90% of daily work with Git. All commands are entered in a terminal (Command Prompt, PowerShell or Terminal on Mac).
git initInitializes a new Git repository in the current foldergit clone <url>Downloads (clones) a repository from GitHub/GitLab to your computergit statusShows the status of changes — which files are modified, added or deletedgit add .Adds all modified files to the staging area (preparation for a commit)git commit -m "message"Saves the changes with a descriptive message — creates a new "snapshot" of the codegit pushSends your commits to the remote repository (GitHub/GitLab)git pullFetches the latest changes from the remote repository to your computergit branch <name>Creates a new branch for parallel developmentgit checkout <branch>Switches to another branchgit merge <branch>Merges the specified branch into the current branchRelated pages
You may also be interested in
VPS Hosting
Root access for Git deploys
What is FTP?
An alternative way to transfer files
What is a Linux server?
The foundation of web hosting
Hosting for the IT sector
Hosting tailored to developers
Ready to launch your website?
Join 4,000+ satisfied customers. Free migration and 15-day money-back guarantee.
Frequently asked questions about Git
Answers to the most common questions about our services.
Our guarantees for your peace of mind
Protected from every angle
15-day guarantee
We refund without questions in the first 15 days.
Free migration
We migrate your site with no downtime — you do nothing.
24/7 support
Our experts are here 24/7 via tickets and live chat.