使用git的基本操作
1.Git的克隆
git clone https://XXXXXXXXXXXXXXXXXXXXX
2.拉取
git pull
3.查询状态
git status
4.添加
git add .
5.提交
git commit -m '注释内容'
6.推送
git push
7.查询分支
git branch
8.切换分支
git checkout
8.查看配置信息
git config -l
9.修改email和name
扫描二维码关注公众号,回复:
2385231 查看本文章
git config --global user.name '***' git config --global user.email '***@***.com'
10.强制提交
git push origin master -f
11.查看提交记录
git log
12.版本回退
git log --prety=oneline git reset --hard head~n head~ 上一个版本 head~~上两个版本 head~n 上n版本 git reset --hard 版本号
13.查看版本
git --version