Skip to content

Commit

Permalink
修复一些目录错误,修改了一些文章
Browse files Browse the repository at this point in the history
  • Loading branch information
RenderTool committed Nov 4, 2023
1 parent 1ff7739 commit 0bcc8df
Show file tree
Hide file tree
Showing 25 changed files with 140 additions and 61 deletions.
7 changes: 1 addition & 6 deletions src/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import { navbar } from "vuepress-theme-hope";
export default navbar([
"/",
"/preface/",
{
text: 'unreal',
icon: "u",
prefix: "/unreal/",
children:["unrealbase/"],
},
"/unreal/",
{
text: "开发语言",
icon: "signs-post",
Expand Down
5 changes: 5 additions & 0 deletions src/tools/git/0-gitbase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Git- 基本操作
order : 1
---

2 changes: 1 addition & 1 deletion src/tools/git/1-gitignore.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Git- 忽略跟踪的文件
order : 1
order : 2
---

## 忽略规则
Expand Down
2 changes: 1 addition & 1 deletion src/tools/git/2-repo-tool.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Git-多仓库工具 Repo
order : 2
order : 3
---


Expand Down
2 changes: 1 addition & 1 deletion src/tools/git/3-commit-message.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Git-规范 Git 提交信息并生成日志
order : 3
order : 4
tag:
- husky
---
Expand Down
2 changes: 1 addition & 1 deletion src/tools/git/4-submodule.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Git- 使用子模块
order : 4
order : 5
---

当希望某个项目依赖于另外一个项目,虽然有 lerna 的方案可以选择,但若希望它具有独立的 `issue``feature` 管理,那么可能需要 `multi-repo` 的形式。
Expand Down
13 changes: 7 additions & 6 deletions src/tools/github/1-download-huge-project-from-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ tag:

## 问题详情

在 Github 上阅读看[PBRTV3](“https://github.com/mmp/pbrt-v3”)不是很方便,所以就想下载下来阅读。
结果下载时下载速度总是只有 4kb/s - 6kb/s,下载到最后还会报错……
每次下载的项目大一点就很慢。

## 解决方案

1. 梯子,国内比较敏感这个就自己解决吧。
2. 使用 Gitee(码云)的时候提供了下载 Github 项目的服务。
### 1. 梯子
>国内比较敏感,这个就自己解决吧。
### 2. 使用 Gitee(码云)
> Gitee提供了下载 Github 项目的服务。
![github上复制代码](assets%2Fgitcode.png)
![github上复制代码](assets%2Fgitcode.png)

![码云上同步](assets%2Fcodeforgithub.png)
![码云上同步](assets%2Fcodeforgithub.png)



Expand Down
110 changes: 97 additions & 13 deletions src/tools/github/2-switch-multiple-github-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,54 @@ tag:
- 踩坑记录
---

## 使用场景
## 问题详情

在很多情况下,常常要对多个 github 账号进行切换。比如,自己的、公司的、小号。
有时候要对多个 github 账号进行切换。比如,自己的、公司的、小号。

## 切换步骤
## 解决思路
### 前置准备

1. 创建 ssh key
| 账户名 | 邮箱 |
|------------|--------------------------|
| username-1 | [email protected] |
| username-n | [email protected] |

2. 将 public key 上传至服务器(名字随意即可)

![github add ssh key](./assets/github-add-ssh-key.png)
<div id="section1">
</div>

3.`~/.ssh/` 目录下创建 config 文件
### 1. 生成其中一个账户密钥
>* GitBash或者IDE中输入
```bash
git config --global user.name 账户名
```
>* 无错误后继续输入
```bash
git config --global user.name 你的邮箱
```
>别傻到直接拷贝,替换中文内容成你对应的账户名、邮箱
### 2. 创建 ssh key

>* 打开CMD输入以下内容
```bash
"ssh-keygen -t rsa -C "你的邮箱"
```
>默认在你的`C:\Users\root/.ssh/`生成id_rsa和id_rsa.pub两个文件,用记事本打开id_rsa.pub
![SSH-KEY.png](assets%2FSSHKEY.png)
### 3. 拷贝上传至服务器(名字随意即可)
![uploadSSH-KEY2Github.png](assets%2Fsshkeynew.png)
### 4. 其他账号重复[1-3](#section1)在 `~/.ssh/` 目录下创建 config 文件
```bash
vim ~/.ssh/config
```
4. config 内容
### 5. 修改config 内容(config文件的规则很简单——在每个Host寻找对应的秘钥。)
``` bash
# 正常使用的 rsa
Expand All @@ -37,15 +66,70 @@ tag:
IdentityFile ~/.ssh/id_rsa_new
```
5. clone 项目
### 6. 测试
``` bash
ssh -T aa.github.com
```
> 如果出现
`Permission denied (publickey).`
> 说明没有对应的秘钥
> 如果出现
`Hi git_xxx! You've successfully authenticated, but GitHub does not provide shell access.`
> 表示配置成功
### 7. 切换账户
> 假定我们A账户切换到N账号
> ```bash
> git config --global user.name n账户名
> git config --global user.email n账户的邮箱
> ```
### 8. clone or add
> clone
```bash
# 原项目地址为
git clone [email protected]:xxxxxx/xxx.git
git clone 你的远程仓库的ssh地址
# 修改为
git clone git@new:xxxxxx/xxx.git
git clone 你的新远程仓库的ssh地址
```
> add
```bash
git remote add origin 你的远程仓库的ssh地址
```
>如果出现错误
` fatal: remote origin already exists`
>则按以下顺序输入
```bash
git remote rm origin
```
```bash
git remote add origin 你的远程仓库的ssh地址
```
> <span style="color:red">什么?你不知道ssh地址怎么来?</span>
![sshurl.png](assets%2Fsshurl.png)
> <span style="color:red">什么?你不知道add和clone是啥?</span>
>我真的快疯掉了.....
* git remote add 用于在已有的本地仓库中添加一个远程仓库的引用。
* git clone 用于将远程仓库的内容完整地复制到本地,同时会自动创建一个默认的远程引用。
### 9. push 项目
>设置好远端后,直接push即可
6. push 项目
```bash
git push -u origin master
```
因为在一开始 clone 的时候已经配置好了,所以 push 时就无需配置了。不过我们还需要 `git config` 修改一下本地的 `user.name``user.email` 来保证是同一个人修改了, 否则会应用全局的 `config` 设置
## 参考资料
如果你阅读本文有点吃力,或者对其中的git操作不太清楚,我强烈建议你看看我写的git基本操作篇。🤦‍♂️
[git基本操作](../git/0-gitbase.md)
11 changes: 7 additions & 4 deletions src/tools/github/3-sync-a-fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ order : 3
tag:
- 踩坑记录
---
## 问题详情
如何同步一个fork?

## 配置 upstream
## 解决思路

### 1. 配置 upstream

```bash
# 查看远程仓库
Expand All @@ -15,17 +19,16 @@ git remote add upstream https://github.com/vueComponent/ant-design-vue.git
git remote -v # 验证
```

## 同步 upstream
### 2. 同步 upstream

```bash
git fetch upstream # fetch
git merge upstream/master # merge
```

## 推送
### 3. 推送

```bash
git push
```

最后前往 github 验证即可。
14 changes: 9 additions & 5 deletions src/tools/github/4-ssh-push-failed.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ tag:
---

## 问题详情
本着能用一个IDE解决问题的想法,尝试用*Rider*开发前端,结果一开始Push就出问题了。
1. 远程空仓库已经建立
![pushtest.png](assets%2Fpushtest.png)
2. 无法推送项目 <br>
本着能用一个IDE来完成各自的想法,尝试用*Rider*开发前端,结果一开始Push就出问题了。
>1. 远程空仓库已经建立
![无法推送](assets%2Fpushtest.png)
>2. 无法推送项目
[email protected]: Permission denied (publickey). fatal: Could not read from remote...
![保存信息](./assets/ssh.png)

![错误提示](./assets/ssh.png)

## 参考资料

1. [CSDN](https://blog.csdn.net/W_317/article/details/106518894)
4 changes: 0 additions & 4 deletions src/tools/github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ tag:

> GitHub 是一个基于 web 的代码托管平台,它提供了版本控制和协作功能,使得开发者可以在项目中共同合作、管理和分享代码。
::: tip
* 本文档只记录一些问题
:::


## 参考资料

Expand Down
Binary file added src/tools/github/assets/SSHKEY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/tools/github/assets/github-add-ssh-key.png
Binary file not shown.
Binary file added src/tools/github/assets/sshkeynew.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/tools/github/assets/sshurl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
14 changes: 10 additions & 4 deletions src/unreal/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
title: unreal
icon: u
article: false
dir:
order: 2
category:
- 文档
- unreal
tag:
- unreal
---
![uelogo.jpg](assets%2Fuelogo.jpg)

## 这是一个关于UE的专题
- [unrealbase](unrealbase/README.md)

## 概述
虚幻引擎(英语:Unreal Engine)是一款由Epic Games开发的游戏引擎。
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions src/unreal/unrealbase/README.md

This file was deleted.

0 comments on commit 0bcc8df

Please sign in to comment.