使用git的步骤:
- 新建文件夹作为代码仓库存放
git init
- 将编写好的文件放进仓库文件夹
git add
文件名 //把文件添加到仓库git commit -m "update in 8.3 by xiaobai"// -m为提交说明
git log
可以查看日志git reset
//回退到上一个版本 add distributed,git reset –hard 1094a //回退到这个版本git reflog
//记录命令
连接github
1.github上创建新的仓库 create new repository
2.git remote add origin git@github.com:Cypress-b/MyVueTemplate.git
3.git push -u origin master
分支相关
查询所有分支
git branch
创建分支
git branch branchname
切换分支
git checkout
创建并切换分支
git checkout -b bypunk
合并分支
git merge -no-ff bypunk