1.初始化git
git config --global user.name name //配置全局用户名
git config --global user.email email //配置全局用户邮箱
git init //git 初始化
git config --list //查看git 配置
2.将项目添加到git
git add filename
git commit -m 提交日志
git reset --hard f56e8dfe92c59b5a8c597a4ef6da9aa85443f74b // 回到某次提交的版本
git rm --cached <file> //从git 版本库中删除
3.创建分支
git branch; //查看分支
git branch branchname //创建分支
git checkout branchname //切换分支
git merge branchname // 合并分支
git branch -d branchname //删除分支(分支被合并后才允许删除)