-
环境配置
设置global user.email
git config --global user.email "email@.."设置global user.name
git config --global user.name "your-name" -
常规操作
克隆github地址
git clone https://.........查看状态
git status添加要添加的文件
git add <name>重置操作
git reset --hard提交操作
git commit <name>初始化操作
git init推送
git push -
git 分支的使用
查看分支:
git branch创建分支:
git branch <name>切换分支:
git checkout <name>创建+切换分支:
git checkout -b <name>合并某分支到当前分支:
git merge <name>删除分支:
git branch -d <name>