git init 仓库名称 创建仓库
git clone [URL] 克隆项目
git add 文件名称 将文件添加到缓存
git status -s 查看当前项目状态
git diff 对比差异
git commit -m "备注" 提交
git reset HEAD 取消已缓存文件
git rm -f 文件名 删除仓库文件 -f 为强制删除 -r 如果为目前 递归删除
git mv 文件名 移动或重命名一个文件
git branch 分支名称 创建分支 -d 删除该分支
git checkout 分支名称 切换分支 -b 创建并切换到该分支
git merge 分支名称 合并到主干
git log 查看提交历史 --author 查看某用户提交的记录
git fetch 从远程仓库同步到本地
git remote add 远程仓库名称 新增远程仓库
git remote rm 远程仓库名称 删除远程仓库
git push 远程仓库名 本地仓库名 本地仓库数据更新到远程仓库