使用 VuePress。
parent
b18f48b652
commit
08e2818d3f
|
@ -0,0 +1,12 @@
|
|||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
|
@ -0,0 +1,3 @@
|
|||
node_modules
|
||||
.temp
|
||||
.cache
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1 @@
|
|||
# Hello VuePress
|
|
@ -8,6 +8,10 @@ categories:
|
|||
- 前端
|
||||
---
|
||||
|
||||
# 前端路由 history 模式刷新 404 的问题
|
||||
|
||||
---
|
||||
|
||||
> 能在官方文档中找到答案的问题,都是我们自己没认真看文档的问题。
|
||||
> <p align="right">——ZhouXY</p>
|
||||
|
|
@ -5,7 +5,13 @@ tags:
|
|||
- VS Code
|
||||
- 开发工具
|
||||
categories:
|
||||
- 开发工具
|
||||
- 开发工具/VS Code
|
||||
---
|
||||
|
||||
# VS Code 占用 CPU 100%
|
||||
|
||||
date: *2020-03-25 10:03:26*
|
||||
|
||||
---
|
||||
|
||||
VS Code 作为 Microsoft 开发的代码编辑器,免费、开源、跨平台,而且颜值高,关键是插件丰富,支持多种语言、IntelliSense 智能感知、强大的调试功能、内置 git 操作等等,让我对这款软件爱不释手,在这里跟网友安利一波。
|
|
@ -0,0 +1,129 @@
|
|||
---
|
||||
date: 2023-02-23
|
||||
---
|
||||
# Git 工作流
|
||||
|
||||
## 0. 创建仓库
|
||||
| | |
|
||||
| -------- | ---- |
|
||||
| 主分支 | main |
|
||||
| 开发分支 | dev |
|
||||
|
||||
## 1. 创建新特性
|
||||
### 1.1 创建 feature 分支
|
||||
```
|
||||
git flow feature start new-feature
|
||||
```
|
||||
Coding and commit...
|
||||
|
||||
> **远程 feature 分支**
|
||||
> ```
|
||||
> git push orgin feature/new-feature
|
||||
> ```
|
||||
> - 该远程分支只是为了同步工作而已,如果没有这方面的需要,等到需要 Pull Request 时创建一个临时的分支即可。
|
||||
> - 其他成员可以将仓库 fork 到 Ta 自己的仓库,并创建分支进行开发,PR 时将 Ta 自己的远程分支合并到项目仓库的 main。
|
||||
|
||||
### 1.2 完成新特性分支
|
||||
|
||||
#### 1.2.1 变基远程 dev 最新的更改到 feature 分支(可选)
|
||||
拉取远程最新(main 和)dev
|
||||
```
|
||||
git pull origin main # 可选
|
||||
git pull origin dev
|
||||
```
|
||||
|
||||
变基到本地 feature 分支
|
||||
```
|
||||
git checkout feature/new-feature
|
||||
git rebase dev
|
||||
```
|
||||
#### 1.2.2 提交 Pull Request
|
||||
|
||||
1. 推送远程分支:
|
||||
```
|
||||
git push orgin feature/new-feature
|
||||
```
|
||||
或
|
||||
```
|
||||
git push --force orgin feature/new-feature
|
||||
```
|
||||
2. 提交一个 Pull Request,项目管理者可使用 `squash and merge` 将分支上的多个提交合并为 dev 上的一个提交;
|
||||
3. 删除远程的 feature 分支:
|
||||
```
|
||||
git push orgin -d feature/new-feature
|
||||
```
|
||||
4. 更新本地的(main 和)dev 分支:
|
||||
```
|
||||
git pull origin main # 可选
|
||||
git pull origin dev
|
||||
```
|
||||
5. 删除本地 feature 分支:
|
||||
```
|
||||
git checkout dev
|
||||
git branch -d feature/new-feature
|
||||
```
|
||||
|
||||
## 2. bugfix
|
||||
|
||||
流程基本和 feature 一样。
|
||||
|
||||
```
|
||||
git flow bugfix start issue-msg
|
||||
git push orgin bugfix/issue-msg
|
||||
```
|
||||
|
||||
> 这里的 bugfix 指的是发布正式版本前需要修复的 bug。
|
||||
|
||||
> 此时 main 的 版本号为 x.x.x-SNAPSHOT,不断合并不同的 feature 和 bugfix。
|
||||
|
||||
## 3. 发布正式版本
|
||||
|
||||
**规约:版本号格式为:主版本号.次版本号.修订号**
|
||||
|
||||
> 假设现在发布 `0.1.0`。
|
||||
|
||||
发布前,确定未合并到 dev 的 bugfix 和 feature 是为下一个版本准备的。
|
||||
|
||||
1. 创建发布分支:
|
||||
```
|
||||
git flow release start 0.1.0
|
||||
```
|
||||
2. 做发布前的准备 *(包括 test、fix、以及可能存在的几次预发布,`0.1.0-SNAPSHOT` -> `0.1.0-rc1` -> `0.1.0-rc2` -> `0.1.0`)* ;
|
||||
3. 创建版本分支并将 release 合并到 dev 和 main:
|
||||
```
|
||||
git checkout release/0.1.0
|
||||
git branch v0.1.x
|
||||
git push orgin v0.1.x
|
||||
git flow release finish 0.1.0
|
||||
```
|
||||
4. 修改 dev 的版本号为 `0.2.0-SNAPSHOT`;
|
||||
5. 推送 main 和 dev 到远程:
|
||||
```
|
||||
git push orgin main --tags
|
||||
git push orgin dev --tags
|
||||
```
|
||||
|
||||
> 预发布时的代码修改,可以直接提交。也可以创建新的 bugfix 分支修复 bug 后合并回 release 分支,但该修复分支其它分支可以不需要知道,只要最后随着 release 合并回 main 和 dev 就好。
|
||||
|
||||
> `v0.1.0` 分支此时的版本号为 `0.1.0`;
|
||||
> `main` 的版本号为 `0.2.0-SNAPSHOT`,为发布 `0.2.0` 做准备,直到创建 `v0.2.x` 分支发布 `0.2.0`。
|
||||
|
||||
## 4. hotfix
|
||||
|
||||
### 4.1 多版本修复
|
||||
hotfix 用于修复当前支持的发布版本中需要修复的 bug,如果与其它支持中的版本兼容,则也将其合并到该发布分支中。
|
||||
|
||||
1. 如果没有 issue 则自行创建;
|
||||
2. 基于 main 上合适的某次提交创建分支 hotfix/issue-name,该节点为需要应用的最后一个版本分支签出时的节点;
|
||||
3. 修复 bug,提交时描述可包含 `fixed #issue-code`;
|
||||
4. 发布分支:`git push origin hotfix/issue-name`;
|
||||
5. 提交 Pull Request 到 main、dev 和需要应用的版本分支;
|
||||
6. 删除该 hotfix 分支:
|
||||
```
|
||||
git branch -d hotfix/issue-name
|
||||
git push origin --delete hotfix/issue-name
|
||||
```
|
||||
7. 各版本分支各自修订号加一(`0.1.0` -> `0.1.1`),提交,加 tag,推送;
|
||||
|
||||
### 4.2 单版本修复
|
||||
各版本分支可创建各自的 hotfix 分支修复 bug,不影响其它版本分支。
|
|
@ -5,7 +5,7 @@ tags:
|
|||
- 开发工具
|
||||
- Maven
|
||||
categories:
|
||||
- 开发工具
|
||||
- 开发工具/Maven
|
||||
---
|
||||
> Apache Maven,是一个软件(特别是 Java 软件)项目管理及自动构建工具,由 Apache 软件基金会所提供。基于项目对象模型(缩写:POM)概念,Maven 利用一个中央信息片断能管理一个项目的构建、报告和文档等步骤。
|
||||
>
|
|
@ -0,0 +1 @@
|
|||
Home
|
|
@ -0,0 +1 @@
|
|||
Home
|
|
@ -0,0 +1 @@
|
|||
Home
|
|
@ -0,0 +1 @@
|
|||
Home
|
|
@ -0,0 +1 @@
|
|||
Home
|
|
@ -0,0 +1,19 @@
|
|||
tags
|
||||
|
||||
- 前端
|
||||
- 前端理由
|
||||
- Vue
|
||||
- git
|
||||
- Spring
|
||||
- Spring MVC
|
||||
- Maven
|
||||
- Linux
|
||||
- Ubuntu
|
||||
- 数据库
|
||||
- PostgreSQL
|
||||
- MySQL
|
||||
- MariaDB
|
||||
- Oracle
|
||||
- DB2
|
||||
- 开发工具
|
||||
- VS Code
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "blog",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"docs:dev": "vuepress dev docs",
|
||||
"docs:build": "vuepress build docs"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@vuepress/client": "2.0.0-beta.60",
|
||||
"vue": "^3.2.47",
|
||||
"vuepress": "2.0.0-beta.60"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
import { defineClientConfig } from "@vuepress/client";
|
||||
|
||||
export default defineClientConfig({
|
||||
enhance({ app, router, siteData }) {},
|
||||
setup() {},
|
||||
rootComponents: [],
|
||||
});
|
|
@ -0,0 +1,87 @@
|
|||
import { defineUserConfig, defaultTheme } from "vuepress";
|
||||
|
||||
export default defineUserConfig({
|
||||
lang: "zh-CN",
|
||||
title: "Code108 的在线笔记",
|
||||
description: "博客、笔记、文档",
|
||||
port: 8190,
|
||||
theme: defaultTheme({
|
||||
logo: "/imgs/favicon.ico",
|
||||
navbar: [
|
||||
{
|
||||
text: "首页",
|
||||
link: "/"
|
||||
},
|
||||
{
|
||||
text: "Spring",
|
||||
link: "/articles/Spring",
|
||||
},
|
||||
{
|
||||
text: "开发工具",
|
||||
link: "/articles/开发工具",
|
||||
activeMatch: '^/开发工具/',
|
||||
children: [
|
||||
{
|
||||
text: "git",
|
||||
link: "/articles/开发工具/git"
|
||||
},
|
||||
{
|
||||
text: "maven",
|
||||
link: "/articles/开发工具/maven"
|
||||
},
|
||||
{
|
||||
text: "VS Code",
|
||||
link: "/articles/开发工具/VSCode"
|
||||
},
|
||||
{
|
||||
text: "JMeter",
|
||||
link: "/articles/开发工具/JMeter"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "前端",
|
||||
link: "/articles/前端",
|
||||
activeMatch: '^/前端/',
|
||||
children: [
|
||||
{
|
||||
text: "commons",
|
||||
link: "/articles/前端/commons"
|
||||
},
|
||||
{
|
||||
text: "Vue",
|
||||
link: "/articles/前端/Vue"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "数据库",
|
||||
link: "/articles/数据库",
|
||||
activeMatch: '^/数据库/',
|
||||
children: [
|
||||
{
|
||||
text: "commons",
|
||||
link: "/articles/数据库/commons"
|
||||
},
|
||||
{
|
||||
text: "PostgreSQL",
|
||||
link: "/articles/数据库/PostgreSQL"
|
||||
},
|
||||
{
|
||||
text: "MySQL",
|
||||
link: "/articles/数据库/MySQL"
|
||||
},
|
||||
{
|
||||
text: "Oracle",
|
||||
link: "/articles/数据库/Oracle"
|
||||
},
|
||||
{
|
||||
text: "DB2",
|
||||
link: "/articles/数据库/DB2"
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
repo: 'http://zhouxy.xyz:3000/ZhouXY108/blog',
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue