下载并安装 Windows Git:https://git-scm.com/downloads/win
cd D:\Visual_Studio\FRC_Start
echo "# FRC_Start" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Anthonyzou101/FRC_Start.git
git push -u origin main使用 Visual Studio 编辑 README.md 文件。
git status # 检查文件状态,查看 README.md 是否已被修改并等待提交
git add README.md # 添加修改到暂存区
# 或者添加所有修改:
git add .
git commit -m "update README.md"
git push origin main # 提交修改touch .gitignore # 新建 .gitignore 文件示例 .gitignore 内容:
# Visual Studio
.vs/
*.vsidx
*.suo
*.user
*.userosscache
*.sln.docstates
# Visual Studio 2015/2017 cache/options
/.vscode/将 .gitignore 文件添加并推送到仓库:
git add .
git commit -m "add .gitignore file"
git push origin main # 提交修改