今天学到什么?
1.git的配置
1.1ssh
的配置
ssh-keygen -t rsa -C xxxxxx@qq.com
将id-rsa.pub的内容复制到公钥里面
1.2git
的三个区
git add //添加到暂存区
git commit //添加到版本库
git push //推送到远程
2.vscode的环境配置
-
2.1插件安装
Open in browser
-
2.2快捷的配置
[
{ "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" }
]
将以下内容按后面的步骤粘贴进
keybindings.json
进入以下界面
代码复制于下列框中
至此快捷键设置完成,按ctrl+w
预览
3.版本回退
-
3.1 git log打印日志信息,可以看到之前提交的版本;
-
3.2时光穿梭机(回到之前的版本)git reset --hard 版本号
-
3.3要重返未来,用git reflog查看命令历史,以便确定要回到未来的哪个版本