Git 命令速查
Git命令速查表,包含常用Git命令及用法说明,适合开发者快速查阅。
使用说明
Git是最流行的分布式版本控制系统,以下是常用命令速查表。
基础命令:
- git init - 初始化仓库
- git clone [url] - 克隆远程仓库
- git add [file] - 添加文件到暂存区
- git commit -m "msg" - 提交更改
- git push - 推送到远程仓库
- git pull - 拉取远程更新
分支操作:
- git branch - 查看分支
- git checkout -b [branch] - 创建并切换分支
- git merge [branch] - 合并分支