Welcome to the Git tutorials documentation! Whether you're new to version control or looking to refine your skills, this guide will help you master Git through practical examples and explanations.
📚 What is Git?
Git is a distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It allows developers to track changes, collaborate, and manage code repositories seamlessly.
🛠 Core Concepts
- Repository (仓库): A directory where your project files and history are stored.
- Commit (提交): A snapshot of your project at a specific point in time.
- Branch (分支): A separate line of development.
- Merge (合并): Combining changes from different branches into one.
📋 Common Commands
Command | Description |
---|---|
git init |
Initialize a new Git repository |
git clone |
Clone an existing repository |
git status |
Check the status of your working directory |
git add |
Stage changes for commit |
git commit |
Save changes to the repository |
🧱 Practical Examples
Create a Repository
git init my_project cd my_project
Track Changes
git add README.md git commit -m "Initial commit"
Work with Branches
git branch feature-1 git checkout feature-1
📖 Expand Your Knowledge
For advanced topics like Git hooks or distributed workflows, visit our Git Advanced Topics guide.