You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 实验一:工欲善其事——开发环境搭建与版本控制入门
文档版本历史
| 版本 | 日期 | 修改人 | 修改内容 |
| :--- | :--------- | :------- | :----------------------- |
| V1.0 | 2024-xx-xx | 张俊能 | 初始版本创建 |
| V1.1 | 2024-xx-xx | 张俊能 | 增加视频转播比分显示模块 |
| V1.2 | 2024-xx-xx | 张俊能 | 增加赛程安排功能模块 |
## 实验信息
- **实验学时**: 2学时
- **实验地点**: 宿舍1C-208
- **合作者**:无
## 实验目的
- [ ] 掌握VSCode的安装及必要插件配置
- [ ] 掌握Git的基本操作( init, clone, add, commit, push, pull)
- [ ] 熟悉Markdown语法, 能够编写结构化的文档
## 实验环境
- **操作系统**: Windows 11
- **开发工具**: Visual Studio Code
- **版本控制**: Git (v2.53.0)
- **远程仓库**: Gitee
- **VSCode插件列表**:
- Markdown All in One
- Draw.io Integration
- GitLens
- 其他: Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code
## 实验内容与步骤
### VSCode环境配置
1. 安装VSCode并配置插件( 截图展示插件列表) :

2. 配置VSCode设置( 如字体大小、自动保存等) :

// 主要配置项说明
1. 设置"editor.fontSize": 14
2. 开启"files.autoSave": "afterDelay"
### Git仓库创建与克隆
1. 远程仓库创建(截图展示远程仓库页面):

仓库地址: https://bdgit.educoder.net/piuplj8o5/git.git
1. 本地克隆与配置:
克隆仓库( 命令及截图展示)

配置用户信息( 命令及截图展示)

### Git提交操作
1. 查看状态与添加文件:
bash
```
git status
git add .
git commit -m "Initial commit: 添加实验一报告模板"
```
2. 提交记录截图:
https://images/experiment1/git-commit.png
3. 推送到远程仓库:
bash
```
git push origin main
```
## 实验结果与分析
### Git提交日志
bash
```
$ git log --oneline
粘贴命令执行结果
```
### 远程仓库验证
- 登录远程仓库,确认文件已成功推送
- 截图验证:
https://images/experiment1/remote-files.png
## 遇到的问题及解决方法
| 问题描述 | 解决方法 |
| :----------------------------- | :----------------------------------------------------- |
| git push时提示权限denied | 配置SSH密钥, 使用`ssh-keygen`生成并添加到远程仓库 |
| VSCode中Markdown预览不显示图片 | 检查图片路径,使用相对路径如`images/实验名/图片名.png` |
## 实验总结
- 本次实验掌握了VSCode+Git+Markdown的基本使用
- 学会了Git 仓库初始化、提交、推送等完整版本控制流程
- 不足之处:对 Git 分支管理、凭据缓存的原理还需要深入学习
## 实验参考资料