--- description: Pull latest changes from remote repository --- # git-pull Pull latest changes from remote repository for current branch. ## What It Does - Fetches latest changes from remote - Merges remote changes into local branch - Updates working directory ## Quick Start Use this command to synchronize your local branch with the latest remote changes. ## Steps ### 1. Execute Pull ```bash git pull ``` This command will: - Fetch updates from remote repository - Automatically merge changes into current branch - Update your working directory ### 2. Handle Conflicts (if any) If merge conflicts occur: - Git will mark conflicting files - Resolve conflicts manually - Stage resolved files: `git add ` - Complete merge: `git commit` Or use: `/git-status` to check conflict status ### 3. Display Result Show result message: ``` ✓ 拉取成功 分支已更新至最新状态。 ``` Or if conflicts: ``` ⚠️ 发生合并冲突 请解决以下文件中的冲突: - src/index.js - README.md 然后运行: git add git commit 或使用 /git-status 查看详细状态 ``` ## Use Cases - Sync local branch with remote updates - Get latest changes from team - Before starting new feature work - Before pushing your changes ## Related Commands - `/git-status` - Check file changes and merge status - `/git-push` - Push local changes to remote - `/git-commit` - Commit local changes ## Notes - Pulls from tracking remote branch (usually origin/main) - Uses default merge strategy (recursive merge) - If conflicts occur, resolve them before committing