今天學(xué)到什么?
1.git的配置
1.1ssh
的配置
ssh-keygen -t rsa -C xxxxxx@qq.com
將id-rsa.pub的內(nèi)容復(fù)制到公鑰里面
1.2git
的三個(gè)區(qū)
git add //添加到暫存區(qū)
git commit //添加到版本庫
git push //推送到遠(yuǎn)程
2.vscode的環(huán)境配置
-
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" }
]
將以下內(nèi)容按后面的步驟粘貼進(jìn)
keybindings.json
進(jìn)入以下界面
代碼復(fù)制于下列框中
至此快捷鍵設(shè)置完成押赊,按ctrl+w
預(yù)覽
3.版本回退
-
3.1 git log打印日志信息,可以看到之前提交的版本每辟;
-
3.2時(shí)光穿梭機(jī)(回到之前的版本)git reset --hard 版本號(hào)
-
3.3要重返未來剑辫,用git reflog查看命令歷史,以便確定要回到未來的哪個(gè)版本