1. 暂存区操作 📁
- 使用
git stash
临时保存未提交的更改:git stash save "修改说明"
恢复时使用: ```bash git stash apply ```
2. 高效分支管理 📌
- 分支策略推荐
feature_branching
:开发新功能前创建独立分支mainline_branching
:主分支保持稳定,通过Pull Request合并
- **查看分支图谱** 使用 `git log --graph` 可视化提交历史
3. 高级提交技巧 ✅
- 交互式提交
可合并多次修改并添加详细描述git commit -i
- squash 合并
将多个提交压缩为一个:git merge --squash <分支名>
4. 远程仓库操作 🌐
- 推送指定分支
git push origin <分支名>
- 查看远程信息
git remote -v
扩展阅读 📚
点击查看 Git 基础教程 了解更底层的操作原理。