Skip to content

Commit

Permalink
vault backup: 2023-04-02 00:46:01
Browse files Browse the repository at this point in the history
Affected files:
inbox/如何对 Github 上的开源项目进行贡献.md
inbox/搭建代理.md
notes/programming/Git.md
  • Loading branch information
615lyw committed Apr 1, 2023
1 parent 4459d7c commit 96e0d2a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
21 changes: 21 additions & 0 deletions inbox/如何对 Github 上的开源项目进行贡献.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
date created: 2023-04-02, 00:10:51
date modified: 2023-04-02, 00:10:54
---

# Meta

- alias:
- parent ::
- siblings ::
- child ::
- refs:
- https://opensource.guide/how-to-contribute/
- https://docs.github.com/en/get-started/quickstart/github-flow#following-github-flow

---

1. folk
2. clone
3. edit, commit and push
4. create pull request
22 changes: 22 additions & 0 deletions inbox/搭建代理.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
date created: 2023-04-02, 00:12:34
date modified: 2023-04-02, 00:12:37
---

# Meta

- alias:
- parent ::
- siblings ::
- child ::
- refs: https://github.com/haoel/haoel.github.io

---

1. 购买海外虚拟机 AWS Lightsail
2. 购买域名 godaddy
3. 配置域名解析 DNS 指向虚拟机 IP
4. 配置虚拟机防火墙
5. 配置 Docker GOST 服务实现代理
6. 配置 Cloudflare Warp 实现原生 IP
7. 配置客户端,例如 Chrome 端的 SwitchyOmega,IOS 端的 shadowRocket
21 changes: 12 additions & 9 deletions notes/programming/Git.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date created: 2022-07-03, 16:02:28
date modified: 2022-08-13, 17:43:43
date modified: 2023-04-02, 00:09:02
---

# Meta
Expand Down Expand Up @@ -434,15 +434,18 @@ Date: Sun Oct 11 23:40:07 2020 +0800
### 分支合并
合并分为两种:
#### merge
- Fast-forward (—ff)
- No-fast-foward (—no-ff)
- merge
- `git merge target_branch` :将目标分支合并至当前分支
- rebase
- 原理:找到两个分支的最近公共祖先,对比当前分支相对于祖先的历次提交提取成临时文件,依次在目标分支的最新节点上“回放 replay”
- 2 种合并策略最终结果是一样的
`git merge target_branch` :将目标分支合并至当前分支
#### rebase
例如想把分支 A 合并到分支 B 上,操作流程:
1. 在分支 A 上执行 `git rebase B`:以 B 为基底执行变基
1. 原理:找到两个分支的最近公共祖先 C,对比当前分支 A 相对于祖先 C 的多次 commit,并依次提取成多个临时文件,在目标分支 B 的最新节点上“回放 replay”这些临时文件,看上去就像 A 在基底 B 的 HEAD 基础上进行了多次 commit
2. 结果:分支 A HEAD 指针领先于分支 B HEAD 指针多个 commit
2. 切换到分支 B 上执行:`git merge A`:让分支 B 的 HEAD 指针快进合并到分支 A 的 HEAD 指针
### 撤销分支合并
Expand Down

0 comments on commit 96e0d2a

Please sign in to comment.