书生大模型实战营之Git前置基础

1,618 阅读3分钟

image.png

任务概览

  • 任务1: 破冰活动:自我介绍
  • 任务2: 实践项目:构建个人项目

任务1完成流程:

1. 先注册一个github账号

本次学习项目的链接: github.com/InternLM/Tu…

image.png

2. 将本项目直接fork到自己的账号下

在这里需要注意一下,不要选择Copy the camp4 branch only

image.png

image.png

3. 克隆项目到InternStudio本地

# clone 项目
git clone https://github.com/Alannikos/Tutorial.git

# 分支名字改为你的uid分支名称
git checkout -b class_id origin/class

image.png

4. 创建自己的介绍文件

image.png

5. 推送分支到远程仓库

# 接下来就是git操作三部曲

git add .

git commit -m "add git_camp4_11_introduction"

git push origin class_11

这里可能会出现一个身份验证的问题:

image.png

解决方案:

5.1 打开Github -> 点击个人头像 -> 点击Settings

image.png

5.3 找到底部的Developer settings

image.png

image.png

5.4 点击token(classic) -> Create new token

image.png

5.5. 选择token的权限:repo

image.png

5.6 保存好token

注意这个roken只在第一次显示,所以记得复制到本地保存。

image.png

然后在接下来和开始一样的操作:git push,但是在输入密码时输入刚刚生成的token。

image.png

6. 检查提交内容并合并分支

界面没有提示的话,就自己去pull request中new pull request,然后注意是推送到class分支,而不是camp4分支。

image.png 然后点击Create pull request

image.png

任务2完成流程:

欢迎大家star项目FunGPT

image.png