1.常用命令
1.1 克隆仓库
git clone <repository_url>
1.2 查看状态
1.3 添加文件到暂存区
1.4 提交更改
git commit -m "commit message"
1.5 推送到远程仓库
git push origin <branch_name>
1.6 拉取远程仓库的更改
git pull origin <branch_name>
1.7 创建分支
1.8 切换分支
git checkout <branch_name>
1.9 合并分支
1.10 查看提交历史
1.11 删除分支
git branch -d <branch_name>
1.12 查看远程仓库
1.13 添加远程仓库
git remote add <remote_name> <repository_url>
1.14 删除远程仓库
git remote remove <remote_name>
1.15 查看分支
1.16 查看远程分支
1.17 查看所有分支
1.18 重命名分支
git branch -m <old_branch_name> <new_branch_name>