Skip to content
Snippets Groups Projects

Merge latest from git-basics into main.

Merged Mark HOEBEKE requested to merge git-basics into main
1 file
+ 19
3
Compare changes
  • Side-by-side
  • Inline
+ 19
3
# Git Basics
## Creating a Repository
### What's a repository ?
## What's a repository ?
A repository is a hierarchy of folders (directories) to store your project files and folders *as well as additional files used by Git to keep track of all operations performed on your project files and folders*.
@@ -10,6 +8,24 @@ A repository is a hierarchy of folders (directories) to store your project files
Git is a distributed version management system. A specific project can be stored in multiple repositories. Usually, there is one reference repository used by all project contributors. All contributors have a local or work repository, which they initially cloned from the reference repository (more on this later).
## What's a Branch ?
In short: a branch is a name used to track the history of changes to files and folders over time, as a series of commits.
A repository can manage as many branches as needed (more on this later). When working on a Git project, there is always a *current* branch. Git provides operations to create/remove/switch between branches.
## What's a Commit ?
In short: a commit is a set of changes to files or folders that we want Git to keep track of, such as:
- Addition a file or folder
- Modification of the contents of a file
- Removal of a file or folder
- Renaming of a file or folder
Git provides operations to specify which files should be part of a commit.
## Create Your First Repository
### [Log In to GitLab](/git-basics/media/gitlab-login.mp4)
Log in to GitLab using your favourite account settings (GitLab, Google, GitHub, Twitter...)
Loading