chore: turn cos to cdn
This commit is contained in:
@@ -223,7 +223,7 @@ git checkout -B 分支名
|
||||
|
||||
页面大概是这样(老图):
|
||||
|
||||

|
||||

|
||||
|
||||
### Git 和 Github
|
||||
|
||||
@@ -263,11 +263,11 @@ ssh-keygen -t rsa -C "youremail@example.com" # youremail为你注册用的电
|
||||
|
||||
登陆 `GitHub`,点击右上角自己的头像,打开 `settings`
|
||||
|
||||

|
||||

|
||||
|
||||
然后打开左侧栏 `SSH and GPG`` keys` 页面
|
||||
|
||||

|
||||

|
||||
|
||||
然后,点 `New SSH Key`,填上任意 Title,在 Key 文本框里粘贴 `id_rsa.pub` 文件的内容即可
|
||||
|
||||
@@ -277,11 +277,11 @@ ssh-keygen -t rsa -C "youremail@example.com" # youremail为你注册用的电
|
||||
|
||||
首先在 GitHub 主页,找到 `New` 或者 `Create repository` 一个绿色的按钮,创建一个新的仓库
|
||||
|
||||

|
||||

|
||||
|
||||
然后填上这个仓库的大名就可以创建了
|
||||
|
||||

|
||||

|
||||
|
||||
根据之前学习的方法在本地创建完 git 仓库之后
|
||||
|
||||
@@ -304,7 +304,7 @@ git clone git@github.com:yourname/gitexample.git
|
||||
|
||||
或者你可以跟随新创建之后的指引,`…or create a new repository on the command line` 内他描述了如何创建一个文件夹、创建一个README.md的文件,然后和github仓库绑定。
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ git clone <url>
|
||||
|
||||
首先,代码的 url 在下图所示的位置
|
||||
|
||||

|
||||

|
||||
|
||||
然后复制完代码后切换回我们的命令行
|
||||
|
||||
@@ -338,7 +338,7 @@ git clone https://github.com/camera-2018/git-example.git
|
||||
|
||||
一阵抽搐过后就下载好了
|
||||
|
||||

|
||||

|
||||
|
||||
::: tip
|
||||
用完之后别忘记给 camera-2018 点个 follow 😋 `呃呃 follow 没用 star 有用`
|
||||
@@ -350,7 +350,7 @@ git clone https://github.com/camera-2018/git-example.git
|
||||
|
||||
如图 我在仓库里新建了 `helloworld.c` 并且写了一些代码
|
||||
|
||||

|
||||

|
||||
|
||||
接下来是提交操作
|
||||
|
||||
@@ -358,7 +358,7 @@ git clone https://github.com/camera-2018/git-example.git
|
||||
git status #看一下文件暂存区
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
红色表示文件没有提交到暂存区 我们要提交
|
||||
|
||||
@@ -368,7 +368,7 @@ git status #看一下文件暂存区
|
||||
git add . #将没有提交的所有文件加入暂存区
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
绿色表示所有文件已加入暂存
|
||||
|
||||
@@ -378,7 +378,7 @@ git commit -m "feat(helloworld): add helloworld file"
|
||||
|
||||
将刚才加入暂区的文件发起了一个提交,提交注释(commit message)是 `feat(helloworld): add helloworld file`
|
||||
|
||||

|
||||

|
||||
|
||||
1. 如果这是你自己的仓库有权限(本人仓库或 Collaborators 有权限的情况下)你就可以直接使用
|
||||
|
||||
@@ -389,7 +389,7 @@ git commit -m "feat(helloworld): add helloworld file"
|
||||
|
||||
上传本次提交
|
||||
|
||||

|
||||

|
||||
|
||||
2. 如果你没有本仓库的主分支提交权限 可以提交 PR(Pull Requests)
|
||||
|
||||
@@ -397,7 +397,7 @@ git commit -m "feat(helloworld): add helloworld file"
|
||||
|
||||
首先创建一个新分支 命名为 `yourname-dev`
|
||||
|
||||

|
||||

|
||||
|
||||
然后按照上面的方法 `git clone` 并切换到你刚创建的分支
|
||||
|
||||
@@ -407,31 +407,31 @@ git commit -m "feat(helloworld): add helloworld file"
|
||||
|
||||
然后提交一个文件,这里直接使用 vscode 自带的 git 工具试试 (很方便、不用敲命令行)
|
||||
|
||||

|
||||

|
||||
|
||||
点暂存所有更改 写好 comment 之后点提交
|
||||
|
||||

|
||||

|
||||
|
||||
最后点同步更改上传
|
||||
|
||||

|
||||

|
||||
|
||||
如果是你提交 在 github 上会显示这个 快捷创建 pr 的按钮
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
点它创建 PR
|
||||
|
||||

|
||||

|
||||
|
||||
这样管理本仓库的人看到 pr 请求就可以 merge 合并辣
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
实际合作过程中可能会出现代码冲突无法 merge 的情况 😋 遇到了自己去 STFW 吧
|
||||
|
||||
@@ -439,7 +439,7 @@ git commit -m "feat(helloworld): add helloworld file"
|
||||
|
||||
可以点击仓库右上角的 fork
|
||||
|
||||

|
||||

|
||||
|
||||
这样会在你的名下多出来一份这个同名仓库,而这个仓库你是拥有所有权限的,你可以 clone 你这个同名仓库,更改代码,提交代码之后
|
||||
|
||||
@@ -499,8 +499,8 @@ Copilot 可以根据上下文和输入的提示,为开发人员生成代码建
|
||||
|
||||
你可以在 `settings` 里看到你的copilot ,配置如下
|
||||
|
||||

|
||||

|
||||
|
||||
然后就可以在你喜欢的 IDE 或编辑器上下载 Copilot 插件,来启用他。
|
||||
|
||||

|
||||

|
||||
|
||||
Reference in New Issue
Block a user