Skip to content

Commit

Permalink
Update Project Structure: Blog folder shoule be named with lower-case…
Browse files Browse the repository at this point in the history
… letters; Reletive URL is Supported
  • Loading branch information
jamesnulliu committed Jul 1, 2024
1 parent c9be79c commit e56e4df
Show file tree
Hide file tree
Showing 30 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Git 速通指南 | Part 1: 基础"

## 1. 安装 Git

参考文章: [安装 Git](https://shusct.github.io/wiki/blog/install-git/) .
参考文章: [安装 Git](../install-git) .

> 📌 **注意**
> 如果你是 Windows 用户, 由于这个 [Issue](https://github.com/gitextensions/gitextensions/issues/5073) 尚未被解决, 我们建议使用 Git Bash (而非 PowerShell) 执行 Git 命令.
Expand Down Expand Up @@ -126,10 +126,10 @@ Fig.4 中的 Version 2 是当前项目的最新版本.
### 4.1. 基础工作流程

1. SSH 密钥连接 GitHub: [4.2. 利用 SSH 密钥链接 GitHub](#42-生成-ssh-密钥并连接-github) .
2. 已有本地储存库:
2. 若已有本地储存库:
- [4.3. 创建一个 GitHub 储存库](#43-创建一个-github-储存库) .
- [4.4. 关联本地储存库与远程储存库](#44-关联本地储存库与远程储存库) .
3. 已有远程储存库:
3. 若已有远程储存库:
- [4.5. 直接 `clone` 远程储存库](#45-直接-clone-远程储存库) .

**常用流程 1** - 本地更改 `push` 到远程储存库:
Expand Down Expand Up @@ -157,7 +157,7 @@ git pull origin <BranchName> --no-rebase

### 4.2. 生成 SSH 密钥并连接 GitHub

参考文章: [利用 SSH 密钥链接 GitHub](https://shusct.github.io/wiki/blog/connect-to-github-with-ssh-keys/) .
参考文章: [利用 SSH 密钥链接 GitHub](../connect-to-github-with-ssh-keys/) .

### 4.3. 创建一个 GitHub 储存库

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: "Git 速通指南 | Part 2: 分支与子模块"
---

[Git 速通指南 | Part 1: 基础](https://shusct.github.io/wiki/blog/git-speedrun-guide-part-1-basics/) 中, 我们已经学习了如何创建 Git 储存库, 如何 `add``commit` 更改, 以及如何进行 `push` 以及 `pull` 操作. 本文将继续介绍 Git 的分支与子模块的使用.
[Git 速通指南 | Part 1: 基础](../git-speedrun-guide-part-1-basics/) 中, 我们已经学习了如何创建 Git 储存库, 如何 `add``commit` 更改, 以及如何进行 `push` 以及 `pull` 操作. 本文将继续介绍 Git 的分支与子模块的使用.

## 0. 准备工作

请保证本地有一个与远程仓库关联的 Git 储存库. 如果没有, 请参考 [Git 速通指南 | Part 1: 基础](https://shusct.github.io/wiki/blog/git-speedrun-guide-part-1-basics/) 第 4 节创建一个远程储存库, 然后直接 `clone` 至本地.
请保证本地有一个与远程仓库关联的 Git 储存库. 如果没有, 请参考 [Git 速通指南 | Part 1: 基础](../git-speedrun-guide-part-1-basics/) 第 4 节创建一个远程储存库, 然后直接 `clone` 至本地.

## 1. 分支

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title: "Git 速通指南 | Part 3: 作为协作者贡献"

## 2. `clone` 项目仓库

参考 [Git 速通指南 | Part 1: 基础 - 4. 远程储存库](https://shusct.github.io/wiki/blog/git-speedrun-guide-part-1-basics/#4-%e8%bf%9c%e7%a8%8b%e5%82%a8%e5%ad%98%e5%ba%93) 中的内容, 将项目仓库 `clone` 至本地.
参考 [Git 速通指南 | Part 1: 基础 - 4. 远程储存库](../git-speedrun-guide-part-1-basics/#4-远程-git-储存库) 中的内容, 将项目仓库 `clone` 至本地.

## 3. 查看 `issue`

Expand Down Expand Up @@ -50,7 +50,7 @@ git switch <BranchName>

</p>

参考 [Git 速通指南 | Part 1: 基础 - 1. 分支]() 创建新分支并推送至远程仓库. 例如, 如果你想解决 `issue #1` (关于支持 `std::format`), 你可以创建一个名为 `feature/#1-support-std-format` 的分支并推送至远程仓库; 参考以下命令:
参考 [Git 速通指南 | Part 2: 分支于子模块 - 1. 分支](../git-speedrun-guide-part-2-branch-and-submodule/#1-分支) 创建新分支并推送至远程仓库. 例如, 如果你想解决 `issue #1` (关于支持 `std::format`), 你可以创建一个名为 `feature/#1-support-std-format` 的分支并推送至远程仓库; 参考以下命令:

```bash
# Switch to the target branch
Expand All @@ -63,7 +63,7 @@ git push origin feature/#1-support-std-format:feature/#1-support-std-format

## 5. `push` 更改

修改完成后, 请将更改 `add``commit` 到本地仓库, 接着先 `pull` 远程仓库的最新更改 (他人可能在你提交之前 `push` 到了你正在工作的分支, 你需要 `pull` 下来进行可能的[冲突处理]()), 然后再 `push` 你的更改至远程仓库:
修改完成后, 请将更改 `add``commit` 到本地仓库, 接着先 `pull` 远程仓库的最新更改 (他人可能在你提交之前 `push` 到了你正在工作的分支, 你需要 `pull` 下来进行可能的[冲突处理](../git-speedrun-guide-part-2-branch-and-submodule/#13-冲突处理)), 然后再 `push` 你的更改至远程仓库:

```bash
# Add local changes to the staged area
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sudo apt install git

## 2. 在 Windows 上安装 Git

安装 Scoop (参考: [在 Windows 上安装 Scoop](https://shusct.github.io/wiki/blog/install-scoop-on-windows/)) 后, 在终端中运行以下命令以安装 Git:
安装 Scoop (参考: [在 Windows 上安装 Scoop](../install-scoop-on-windows/)) 后, 在终端中运行以下命令以安装 Git:

```powershell
scoop install main/git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ title: 重置 Windows 并且安装 Ubuntu 双系统

## 2. 下载 Ubuntu Desktop

> 💬 目前 Ubuntu 24.04 LTS 已经发布, LOGO 是大家最爱的鼠鼠, 感兴趣的同学可以参考本文安装 Ubuntu 24 哦~
进入 https://ubuntu.com/download/desktop .

Ubuntu 23 比较好看, 所以接下来我准备下载 23. 你也可以选择下载 22.
Expand Down

0 comments on commit e56e4df

Please sign in to comment.