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
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
Hosting for the IT sector
Hosting tailored to developers
Ready to launch your website?
Join 4,000+ satisfied customers. Free migration and 30-day money-back guarantee.
Frequently asked questions about Git
Answers to the most common questions about our services.
Call us: support works 24/7, by phone and through tickets.
(+381) 60 3535 720What is Git in simple terms?
Git is a version control system — a tool that remembers all the changes in your code. Imagine Google Docs but for code — every change is saved, you can return to any previous version, and several people can work on the same project at once without conflicts.
What is the difference between Git and GitHub?
Git is a tool (software) for version control that runs locally on your computer. GitHub is an online platform (service) that hosts Git repositories in the cloud and adds features such as pull requests, issues, CI/CD and collaboration. You can use Git without GitHub, but GitHub requires Git.
Do I need Git for an ordinary website?
For a simple WordPress site or a static site, Git is not mandatory, but it is very useful. Git lets you track all changes, safely test new functionality in branches and easily revert to a previous version if something goes wrong. For professional projects, Git is the industry standard.
How do developers use Git to deploy a website?
A typical workflow: the developer makes changes locally, commits them to Git, pushes to GitHub/GitLab, where a CI/CD pipeline automatically tests the code and deploys it to the server. This is called Git-based deployment and is used by companies of all sizes — from startups to Google.
What is a commit in Git?
A commit is a "snapshot" of your code at a particular moment — like "Save" in a game. Each commit has a unique ID, a message describing the changes, an author and a timestamp. You can return to any previous commit and see the exact code as it was at that moment.
Our guarantees for your peace of mind
Protected from every angle
30-day guarantee
We refund without questions in the first 30 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.