Git
Aller à la navigation
Aller à la recherche
Overview
Git is a distributed version control system that tracks changes in files and coordinates work among multiple collaborators. It is the core tool used by GitLab and other platforms for version control.
Getting Started
- Download and install Git
- Follow the steps of the installation wizard
Key Concepts
- Repository (repo): A folder containing all project files and history
- Commit: A snapshot of changes in the repository
- Branch: An independent line of development
- Merge: Combining changes from one branch into another
- Clone: Copying a repository to your local machine
- Push / Pull: Sending or retrieving changes to/from a remote repository
Main Uses
- Track changes in code or scripts for experiments
- Collaborate with team members on software projects
- Maintain a full history of project development
- Integrate with GitLab for online project management and CI/CD pipelines
Why It Matters
- Ensures all team members work on the most up-to-date version of a project
- Prevents accidental overwriting of changes
- Provides a complete record of all modifications for reproducibility
- Enables safe experimentation using branches and merges
When You Will Use It
- Cloning a repository to your computer
- Making changes and committing them
- Pushing updates to a shared repository
- Pulling updates from teammates
- Reviewing project history or reverting changes
Good Practices
- Commit changes frequently with clear messages, using conventional commits
- Use branches to isolate new features or experiments
- Pull updates before starting work to avoid conflicts
- Keep your local repository organized and up to date