git clone git仓库地址
git clone -b zcl git的仓库地址
git config [--global] user.name "[name]"
git config [--global] user.email "[email address]"
#添加指定文件到暂存区
git add [file1] [file2]...
#添加当前目录的所有文件到暂存区
git add .
# 从暂存区 到 本地仓库
git commit -m "相关描述"
git commit -m "test" #样例
#提交 暂存区的指定文件 到 本地仓库
git commit [file1] [file2] ... -m [message]
#提交时 显示所有diff信息
git commit -v
#列出所有本地分支
git branch
#列出所有远程分支
git branch -r
#列出所有本地分支和远程分支
git branch -a
#切换到指定分支,并更新工作区
git checkout [branch-name]
#合并指定分支到当前分支
git merge [branch]
#显示有变更的文件
git status
#显示当前分支的版本历史
git log
#显示commit历史,以及 每次发生变更的文件
git log --stat
#暂存区 与 工作区的差异
git diff
#下载远程仓库的所有变动
git fetch [remote]
#取回远程仓库的变化,并与本地分支合并
git pull [远程仓库名] [本地分支名]
git pull origin zcl
git pull = git fetch + git merge
当前签出到的分支,具有相应的远程跟踪分支
通过 git status来检查