git简单的操作命令

创建仓库   git  init  --bare
克隆一个仓库 git clone 当前的仓库  线上的仓库
克隆一个仓库 git clone 当前的仓库  线上代码
添加命令 git add 文件名称
提交命令 git conmit 文件名称  -m  '注释'
添加到线上服务器仓库  git push
添加线上代码  git pull
展示版本历史  git log
恢复版本库  git reset 版本号哈希的字符串  
安全恢复版本库  git revert    版本号哈希的字符


创建分支  git branch      分支名称  || 检出分支  git checkout  -b  分支名称
检出分支  git checkout    分支名称
合并分支  git merge       分支名称
删除分支  git  branch -d  分支名称
分支关联    git remote show  ||  git remote show 分支名称
添加仓库  git remote add 仓库名称

原文地址:https://www.cnblogs.com/zhanghuilong/p/6526382.html