2018-07-09

day01

1.git的简单应用

1.安装git软件并进行配置

简单的配置
打开git base
配置全局信息在命令行中输入
git config --global user.name +名称
git config --global user.email +邮箱

2.注册码云

3.项目

1.新建项目

在码云中登陆并选择新建项目选项

2.克隆

复制css中地址

在相应文件夹打开git

输入git cloen 后面黏贴复制的地址,回车


2018-07-09_第1张图片
1.png

3.新建文档
在生成的文档中新建txt文档
4.进入文档右击空白地段选择git
输入git add .添加到暂存区
输入git commit -m'1',将1文件添加到版本库
输入git push上传到项目

如图
222.png

2018-07-09_第2张图片
333.png

4.撤回版本

用git log可查看之前的版本


2018-07-09_第3张图片
555.png

回到之前的版本用git reset --hard 版本号
用git reflog查看命令历史,确定要回到未来的哪个版本


2018-07-09_第4张图片
234234234.png

上述过程中三个区的概念如图所示


2018-07-09_第5张图片
222222.png

5.配置ssh

打开git base 输入ssh-keygen -t rsa -C +邮箱地址生成ssh
生成的文件如图所示在我的文档中的如下如图位置


2018-07-09_第6张图片
22.png

用txt格式打开id_rsa.pub
复制文档中的全部信息
打开码云


2018-07-09_第7张图片
11.png

添加ssh公钥
以后clone的项目使用SSH就不用输入用户密码了

2.Visual Studio Code的简单应用

1.

打开软件Visual Studio Code在扩展中搜索open in browser并安装
安装完成如图

2018-07-09_第8张图片
4322.png

2.

打开文件-首选项-键盘快捷方式
点开如图所示位置

2018-07-09_第9张图片
2133.png

将如下代码复制进去
[
{ "key": "alt+/", "command": "editor.action.triggerSuggest","when": "editorTextFocus" },
{ "key": "ctrl+d", "command": "editor.action.deleteLines","when": "editorTextFocus" },
{ "key": "ctrl+alt+down","command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" },
{ "key": "ctrl+alt+up", "command": "editor.action.copyLinesUpAction", "when": "editorTextFocus" },
{ "key": "shift+enter", "command": "editor.action.insertLineAfter", "when": "editorTextFocus && !editorReadonly" } ,
{"key":"ctrl+w","command": "extension.openInBrowser" , "when": "editorTextFocus" }
]

3.

新建html文件


2018-07-09_第10张图片
123123123.png

ctrl+s保存
ctrl+w查看


2018-07-09_第11张图片
3243242.png

你可能感兴趣的:(2018-07-09)