<file·>表示文件名称
-
克隆现有的项目
— git clone <address`> -
初始化版本库
— git init -
添加文件到暂存区
— git add (git add -A) -
添加文件到本地仓库
— git commit -m “注释” -
查看仓库当前状态
— git status -
暂存区内容回归到本地仓库工作区
— git reset HEAD <file`> -
工作区内容清理
— git checkout --<file`> -
提交的历史版本
— git log -
列出本地已经存在的分支
— git branch -
查看所有分支
— git branch -a -
切换分支
— git checkout <file`> -
取回远程分支的更新,再与本地的指定分支合并
— git pull origin <file`> -
列出远程分支
— git branch -r -
从远程获取最新版本到本地
— git fetch -
回到暂存区的版本文件
— git reset --hard(commit 序列号)
(使用软件:Sourcetree,下载地址:https://www.sourcetreeapp.com/)