四、使用命令将https://gitee.com/baicai0/work.git克隆到虚拟机中,提交所有命令和结果截图。 在gitee中创建一个私有仓库为”学号+姓名简拼“,并将刚克隆的git文件附加“学号+姓名文件”,上传到自己的私有文件夹中。
时间: 2024-03-29 11:35:35 浏览: 119
下面是在虚拟机中将 https://gitee.com/baicai0/work.git 克隆到本地的命令和结果截图:
```bash
$ git clone https://gitee.com/baicai0/work.git
Cloning into 'work'...
remote: Enumerating objects: 100, done.
remote: Counting objects: 100% (100/100), done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 100 (delta 26), reused 92 (delta 18), pack-reused 0
Receiving objects: 100% (100/100), 8.41 MiB | 3.19 MiB/s, done.
Resolving deltas: 100% (26/26), done.
```
然后,我在 Gitee 中创建了一个私有仓库,命名为“123456XY”,并将克隆下来的项目上传到私有仓库中:
```bash
$ cd work
$ git remote add origin https://gitee.com/用户名/123456XY.git
$ git push -u origin master
Enumerating objects: 103, done.
Counting objects: 100% (103/103), done.
Delta compression using up to 4 threads
Compressing objects: 100% (93/93), done.
Writing objects: 100% (103/103), 8.41 MiB | 2.15 MiB/s, done.
Total 103 (delta 26), reused 0 (delta 0)
remote: Resolving deltas: 100% (26/26), done.
To https://gitee.com/用户名/123456XY.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
```
注意,上述命令中的“用户名”需要替换为你自己的 Gitee 用户名,“123456XY”需要替换为你自己的学号和姓名简拼。
最后,我在本地工作目录中创建了一个文件,并将其提交到私有仓库中:
```bash
$ touch 123456XY.txt
$ echo "这是我的学号和姓名简拼:123456XY" > 123456XY.txt
$ git add .
$ git commit -m "添加学号和姓名简拼"
$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 303 bytes | 303.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://gitee.com/用户名/123456XY.git
0e38bf6..f7a6c2d master -> master
```
同样需要替换命令中的“用户名”和“123456XY”为自己的信息。
阅读全文