1.git
码云 相当于github 免费的服务器(国产)
gitLab(开源服务器)
2.登录 Your Projects
第一步:安装git
第二步:注册 基于gitLab(开源服务器) github(社区)
http://www.orqt.com/users/sign_in
第三步:配置git环境
点个人图标==》setting
1.本地环境
打开命令行 :配置登录用户和邮箱
git config --global user.name ‘xxxxx’
git config --global user.email ‘xxx@xx.xxx’
查看:git config --list
2.账号配置 SSH秘钥
百度搜索git SSH
ssh-keygen -t rsa -C ‘上面的邮箱’在git中输入
查看 用户==》wuli==》.ssh==》id_rsa.pub 中的内容粘贴到
gitlab中头像下的setting页面中的 sshKey中
3.创建项目:
projects/your projects
new Project 使用Blank project
4.clone项目 关联本地和gitLab
clone失败就删除文件:管理员权限打开cmd
如:rd /s /q c:\users\wuli\desktop\gittest1
- git add
git commit -m ‘’
git push origin
6.git branch dev
git checkout dev
git branch
git
代码更新
git pull
2018-10-25
git
分布式
svn集中式
1.代码管理工具:git 和 svn
上班:download 把代码下载下来:192.168.2.21:8080/personal
update 更新代码
下班:commit 提交写的代码
2.集中式和分布式
3.git的使用:
第一步:安装git
第二步:
去github上申请一个账号
第三步:全局匹配
git config --global user.name “Your Name”
git config --global user.email “email@example.com”
检测是否匹配成功: git config --list
第四步:操作
1.github上 创建仓库
2.git init 初始化仓库
3.git status 查看文件的状态 (可选)
4.git add 文件名 || git add . 全部上传
5.git commit -m “”
6.git log 查看代码的提交状态
7.git remote add origin https://github.com/mswuli/8905test.git
git push -u origin master
8.git pull 更新代码
9.git clone https://github.com/songjinzhong/ES6Learning.git
10.分支: aa
git branch aa 创建分支
git checkout aa 切换分支
git branch 查看分支
git merge aa 合并分支的内容
git branch -d aa 删除分支
上班:
git init
每写一点 就上传一点 git add 文件名/git add 文件名
一遍查看是否成功 git status
中午吃饭:git commit -m ‘首页’
睡完午觉:再次git add ,git commit ,
代码回到中午吃饭时的状态 :git reset --hard aaw233
查看commit的状态 git log
下班:提交到服务器
git remote add origin https://github.com/mswuli/8905test.git
kgc: web
迭代开发 分支
敏捷开发 中小型项目