feat: add admin publishing workflow and yar theme
Add Go/Postgres admin APIs, Angular admin UI, manual build flow, asset uploads, markdown import/export, configurable slug generation, and the Yar reading theme. Exclude local docs and generated development artifacts from version control.
This commit is contained in:
parent
b78f4b39c9
commit
f0b50d13ea
121 changed files with 27139 additions and 550 deletions
68
content/posts/git-learning.md
Normal file
68
content/posts/git-learning.md
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
id: ea5fd351-1d43-467f-a1d2-1b3c2300083c
|
||||
slug: git-learning
|
||||
title: git 学习
|
||||
summary: ""
|
||||
status: published
|
||||
tags: []
|
||||
cover: ""
|
||||
version: 1
|
||||
slug_source: manual
|
||||
slug_locked: true
|
||||
published_at: "2026-01-01T04:14:49+08:00"
|
||||
created_at: "2022-10-14T21:06:00+08:00"
|
||||
updated_at: "2026-01-07T18:10:38+08:00"
|
||||
---
|
||||
|
||||
git 虽说也用了蛮久的了,但是其实来来去去也是一些基础操作,更深入的倒也没有怎么去学,趁着这段时间稍微有些时间,把以前的笔记整理到这里来,也方便之后来查看。
|
||||
|
||||
## git commit
|
||||
这个命令用于提交记录
|
||||
```git
|
||||
git commit
|
||||
```
|
||||
|
||||
## git branch newImage
|
||||
这个命令用于创建新的分支。
|
||||
|
||||
Git 的分支也非常轻量。它们只是简单地指向某个提交纪录 —— 仅此而已。所以许多 Git 爱好者传颂。
|
||||
|
||||
***早建分支!多用分支!***
|
||||
|
||||
这是因为即使创建再多的分支也不会造成储存或内存上的开销,并且按逻辑分解工作到不同的分支要比维护那些特别臃肿的分支简单多了。
|
||||
|
||||
在将分支和提交记录结合起来后,我们会看到两者如何协作。现在只要记住使用分支其实就相当于在说:“我想基于这个提交以及它所有的父提交进行新的工作。”
|
||||
### 创建分支
|
||||
```git
|
||||
git branch newImage
|
||||
```
|
||||
### 切换分支
|
||||
```git
|
||||
git checkout <name>
|
||||
```
|
||||
|
||||
### 融合分支
|
||||
```git
|
||||
git merge <name>
|
||||
```
|
||||
|
||||
## 重基
|
||||
```
|
||||
git rebase <name>
|
||||
```
|
||||
|
||||
## ^ 和 ~number
|
||||
```git
|
||||
可以通过 ^ 符号向上找到父节点
|
||||
~ 则是多个
|
||||
```
|
||||
|
||||
## Git Reset
|
||||
git reset 通过把分支记录回退几个提交记录来实现撤销改动。你可以将这想象成“改写历史”。git reset 向上移动分支,原来指向的提交记录就跟从来没有提交过一样。
|
||||
|
||||
## Git Revert
|
||||
虽然在你的本地分支中使用 git reset 很方便,但是这种“改写历史”的方法对大家一起使用的远程分支是无效的哦!
|
||||
|
||||
奇怪!在我们要撤销的提交记录后面居然多了一个新提交!这是因为新提交记录 C2' 引入了更改 —— 这些更改刚好是用来撤销 C2 这个提交的。也就是说 C2' 的状态与 C1 是相同的。
|
||||
|
||||
revert 之后就可以把你的更改推送到远程仓库与别人分享啦。
|
||||
Loading…
Add table
Add a link
Reference in a new issue