remote vscode无git_vs code 使用git
1.下載git?https://git-scm.com/
2. git 全局設置
git config --global user.name "xxxx"
git config --global user.email "xxxx@xx.com"
3.創建git 本地倉庫
進入指定文件夾 執行git init
添加遠程 地址??git remote add origin https://gitee.com/richard1015/ljlxnewh5.git
拉去遠程數據 git pull
4.此時用vscode 打開該文件夾 發現web 下什么也沒有
點擊左下角master
遠程項目 master 遠程 同步到本地
5.使用vs code 提交 代碼
提交時輸入賬號密碼(你的git賬號密碼)
6.每次提交代碼時都會輸入賬號密碼
下面介紹2種解決辦法
https 方式每次都要輸入密碼,按照如下設置即可輸入一次就不用再手輸入密碼的困擾而且又享受 https 帶來的極速
設置記住密碼(默認15分鐘):
git config --global credential.helper cache
如果想自己設置時間,可以這樣做:
git config credential.helper 'cache --timeout=3600'
這樣就設置一個小時之后失效
長期存儲密碼:
git config --global credential.helper store
增加遠程地址的時候帶上密碼也是可以的。(推薦)
http://yourname:password@gitee.com/name/project.git
補充:使用客戶端也可以存儲密碼的。
如果你正在使用ssh而且想體驗https帶來的高速,那么你可以這樣做: 切換到項目目錄下 :
cd projectfile/
移除遠程ssh方式的倉庫地址
git remote rm origin
增加https遠程倉庫地址
git remote add origin http://yourname:password@gitee.com/name/project.git
Update:
搞定,enjoy the speed!
總結
以上是生活随笔為你收集整理的remote vscode无git_vs code 使用git的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 三星q90r如何升级系统_看尚电视强制升
- 下一篇: 女生好听的个性签名251个