任务1: 破冰活动:自我介绍
任务2: 实践项目:构建个人项目
任务1: 破冰活动:自我介绍
- VSCODE下载Git插件:
- 打开Github:https://github.com/InternLM/Tutorial,新建分支(Fork)
- 创建后构建自我介绍:
(base) root@intern-studio-017549:~# cd demo/
(base) root@intern-studio-017549:~/demo# ls
cli_demo.py download_mini.py file hello_world.py mydir mydir2 myenv.yml
# 在自己创建的分支下git clone
(base) root@intern-studio-017549:~/demo# git clone https://github.com/GMYelims/Tutorial.git
Cloning into 'Tutorial'...
remote: Enumerating objects: 786, done.
remote: Counting objects: 100% (125/125), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 786 (delta 39), reused 99 (delta 21), pack-reused 661
Receiving objects: 100% (786/786), 222.02 KiB | 568.00 KiB/s, done.
Resolving deltas: 100% (277/277), done.
Updating files: 100% (70/70), done.
(base) root@intern-studio-017549:~/demo# ls
Tutorial cli_demo.py download_mini.py file hello_world.py mydir mydir2 myenv.yml
(base) root@intern-studio-017549:~/demo# cd Tutorial/
# 显示所有分支
(base) root@intern-studio-017549:~/demo/Tutorial# git branch -a
* camp3
remotes/origin/HEAD -> origin/camp3
remotes/origin/camp3
(base) root@intern-studio-017549:~/demo/Tutorial# git checkout -b camps origin/camp3
Branch 'camps' set up to track remote branch 'camp3' from 'origin'.
Switched to a new branch 'camps'
# 包含我的问卷号的分支
(base) root@intern-studio-017549:~/demo/Tutorial# git checkout -b camp3_139
Switched to a new branch 'camp3_139'
# 新建自己的介绍文档
(base) root@intern-studio-017549:~/demo/Tutorial# touch ./data/Git/task/camp3_139.md
(base) root@intern-studio-017549:~/demo/Tutorial# git add .
(base) root@intern-studio-017549:~/demo/Tutorial# git commit -m "add git_139_introduction"
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@intern-studio-017549.(none)')
# 首次Git需要填写
(base) root@intern-studio-017549:~/demo/Tutorial# git config --global user.name "you@example.com"
(base) root@intern-studio-017549:~/demo/Tutorial# git config --global user.email "Your Name"
(base) root@intern-studio-017549:~/demo/Tutorial# git commit -m "add git_139_introduction"
[camp3_139 00ba471] add git_139_introduction
1 file changed, 8 insertions(+)
create mode 100644 data/Git/task/camp3_139.md
(base) root@intern-studio-017549:~/demo/Tutorial# git push origin camp3_139
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 128 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 728 bytes | 104.00 KiB/s, done.
Total 6 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for 'camp3_139' on GitHub by visiting:
remote: https://github.com/GMYelims/Tutorial/pull/new/camp3_139
remote:
To https://github.com/GMYelims/Tutorial.git
* [new branch] camp3_139 -> camp3_139