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.
    repository
  • Commit (提交): A snapshot of your project at a specific point in time.
    commit
  • Branch (分支): A separate line of development.
    branch
  • Merge (合并): Combining changes from different branches into one.
    merge

📋 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

  1. Create a Repository

    git init my_project
    cd my_project
    
    create_repository
  2. Track Changes

    git add README.md
    git commit -m "Initial commit"
    
    track_changes
  3. Work with Branches

    git branch feature-1
    git checkout feature-1
    
    branch_management

📖 Expand Your Knowledge

For advanced topics like Git hooks or distributed workflows, visit our Git Advanced Topics guide.

git_workflow