
Git的作者是Linux的作者Linus用两周的时间创造出来的,是目前世界上最先进的分布式版本控制系统(没有之一)
作用- 版本管理
- 多人协同开发项目
git config --global user.name "nameval" 配置用户名 git config --global user.email "eamil@163.com"配置邮箱命令
- 添加到暂存盘
git add view.html
git add *.html
git add .
- 从暂存盘撤回
git checkout view.html
- 添加到版本库
git commit -m "提示文本"
- 切换版本库
git reset --hard 版本号
git reset --hard HEAD^^
- 记录
- 分支
- 远程相关命令
- 远程创建空的仓库
- 本地
// 本地 git remote add origin xxx.git // 本地 git add .
-
git commit -m "提示"
- 分支是独立的且相互不影响
- 作的时候先使用pull拉取更新(服务器永远是最新的)
- 写代码
-
git add . git commit -m "提示"
-
// 执行以下命令将分支推送到服务器 git push origin xxx
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)