下載 git
設(shè)置全局配置
git config --global user.name "your name"
git config --global user.email "your email"
初始化項(xiàng)目
cd d:/var/www/php //首先指定到你的項(xiàng)目目錄下
git init
touch README.md
git add README.md
git commit -m "first commit"
// 用你倉庫的url,vscode.git中vscode為倉庫名稱,使用時(shí)必須先創(chuàng)建
git remote add origin https:\\github.com/youtname/vscode.git
// 提交到你的倉庫
git push -u origin master
記住密碼
git config --global credential.helper store //在Git Bash輸入這個(gè)命令就可以了
VSCode 使用 Git
- 修改文件
img
- 切換到 git 標(biāo)簽
- 暫存更改
img
- 提交更改
img
- 推送更改
img
國內(nèi)還是碼云好用些
image.png