git clone xxx:克隆项目
git status:查看当前仓库状态
git add .:添加到暂存区
git commit -m"xxx":添加到本地仓库
git pull:同步远程仓库到本地,检查远程仓库是否比本地版本更高一些
git push:将项目从本地仓库提交到远程仓库
git branch xxx:创建分支
git checkout xxx:切换分支
git branch:查看本地分支
git branch -a:查看所有分支
git merge xxx:合并分支
git branch -d:删除已合并的分支
git branch -D dev:强制删除本地分支
git push origin --delete dev:强制删除远程分支
git log:查看分支版本号
git reset --hard commitld(要回退的版本号): 本地分支回滚
git push -g origin dev:远程分支回滚
git remote add 远程仓库的地址:将本地仓库和远程仓库建立一个连接
git remote -v:查看本地和远程仓库关联情况