Compare commits

...

14 commits

Author SHA1 Message Date
SevicheCC
14eca348d5
post modify 2024-10-30 02:30:30 +08:00
SevicheCC
ec77b7991c
new post 2024-10-29 02:36:58 +08:00
SevicheCC
f89931db5e
new friend 2024-10-27 13:45:52 +08:00
SevicheCC
351defae29
test fish 2024-10-21 19:12:52 +08:00
SevicheCC
7f991888c8
update about 2024-10-21 10:39:57 +08:00
SevicheCC
88c2451f1c
test fish 2024-10-15 21:00:00 +08:00
SevicheCC
44161293b1
test fish 2024-10-15 12:05:21 +08:00
SevicheCC
6857d0db43
fix css 2024-10-15 11:59:36 +08:00
SevicheCC
709a0ecced
fix url 2024-10-15 00:45:49 +08:00
SevicheCC
d2a4de22ec
fix:empty file 2024-10-15 00:16:12 +08:00
SevicheCC
163636db1c
new post 2024-10-14 23:53:58 +08:00
SevicheCC
fc3dc11a6c
fix typo 2024-09-15 03:41:53 +08:00
SevicheCC
d26faa908c
fix typo 2024-09-15 00:03:54 +08:00
SevicheCC
605955c529
new post 2024-09-14 23:03:53 +08:00
11 changed files with 9051 additions and 7010 deletions

File diff suppressed because it is too large Load diff

View file

@ -103,5 +103,13 @@ export const friends: Friend[] = [
name: '竹子',
link: 'https://zhuzi.dev',
descr: 'Blah Blah Booooom'
},
{
id: 'litomore',
rel: 'friend',
title: "LitoMore's Mind",
name: 'LitoMore',
link: 'https://litomore.me',
avatar: 'https://avatars.githubusercontent.com/u/8186898?v=4'
}
]

View file

@ -43,23 +43,28 @@ tags:
- 下载叫做 pull上传是 push
| 命令 | 作用 |
| :----------------------------------------------------------- | ------------------------------------------------- |
| `git config --global user.name 名字` | 设置名字 |
| `git config --global user.email 邮箱` | 设置邮件 |
| `git init` | 初始化 |
| `git add -A` | 追踪所有文件(除了 gitignore 里面的),也可以单独加 |
| `git commit -m` | m 代表信息,后面要写 commit 相关信息 |
| `git status` | 查看 git 状态/信息 |
| `git log` | 查看 commit 日志,按 Q 才可以退出 |
| `git reset hard (commit的id` | 回到特定版本 |
| `git reset hard --HEAD` | 返回上一次改动 (还没有 commit) |
| `git branch` | 列出现在有的 branch,按 Q 退出 |
| `git branch branch'name)` | 创建新 branch |
| `git merge branch'name)` | 合并 branch 到 main |
| `git checkout (branch's name)` | 切换 branch |
| `git remote add origin https://github.com/用户名/仓库名.git` | 链接到 remote repo |
| `git pull` | 拉更新 |
| `git push origin (branch'name)` | push 到 remote repo |
| :------------------------------------------------------------- | -------------------------------------------------- |
| `git config --global user.name "名字"` | 设置全局用户名 |
| `git config --global user.email "邮箱"` | 设置全局邮箱 |
| `git init` | 初始化仓库 |
| `git add -A` | 追踪所有文件(除了.gitignore里的也可以单独添加 |
| `git commit -m "提交信息"` | 提交更改,-m 后跟提交信息 |
| `git status` | 查看仓库状态 |
| `git log` | 查看提交日志,按 Q 退出 |
| `git reset --hard <commit_id>` | 回到特定版本 |
| `git reset --hard HEAD^` | 返回上一次改动还没有commit |
| `git branch` | 列出所有分支,按 Q 退出 |
| `git branch <branch_name>` | 创建新分支 |
| `git merge <branch_name>` | 将指定分支合并到当前分支 |
| `git checkout -b <new_branch>` | 创建新分支并切换到该分支 |
| `git checkout <branch_name>` | 切换到指定分支 |
| `git remote add origin https://github.com/username/repo.git` | 添加远程仓库 |
| `git pull` | 从远程仓库拉取更新 |
| `git push origin <branch_name>` | 推送指定分支到远程仓库 |
| `git config --global push.default current` | 设置推送默认行为为推送当前分支到同名远程分支 [^1] |
| `git commit --amend --author="Name <email@example.com>"` | 修改最近一次提交的作者信息 |
| `git config --global push.autoSetupRemote true` | 自动设置远程跟踪分支 |
| `git config --global http.proxy http://proxy.example.com:8080` | 设置全局 HTTP 代理[^2] |
## 常见问题

View file

@ -1,14 +0,0 @@
---
title: 直率
created: 2024-01-22
summary: This is not funny at all.
comment: false
---
常常觉得好多男的对女性的认识是如此的片面和贫瘠,他们最常接触的女性就是每天挂在嘴边的那几句辱女脏话,觉得女性都是爱慕容貌身材的、是显而易见的电脑小白、是善妒拜金的,却看不到自己作为男性所享有的社会资源倾斜,不知道自己为什么不像她们那样。
有的男性熟练“女性优先”这种被教育的礼仪,比如帮女性推门、不由分说地帮提东西之类的,但在我看来这实在是很廉价的东西,跟尊重女性扯不上什么关系,这样做的男性在很多关键时候却丝毫不会谦让女性,甚至霸占他所不拥有的那一份,你问他为什么要做?噢习惯而已。
还有的人喜欢把当众说黄色笑话作为直率,哇,很直率,素质之低,大家都看到了。
什么,你也觉得我直率吗,直率得很讨厌? 谢谢,其实我也讨厌你。

View file

@ -0,0 +1,143 @@
---
title: 使用 Obsidian 三年之后的设置 (外观篇)
created: 2024-09-14
summary: 爱用 Minimal 主题就是 Minimalist 吗
tags:
- Obsidian
image: /2024-09-14-obsidian-apperance/cover.png
---
截止这篇文章发布的时候2024年9月14日我的 Obsidian 库里面有2874个文档最早的文件创建时间是 2021年5月18日。我的设备是Macbook Pro M1 2020目前还足够跑一个这样的Obsidian仓库没有卡慢的情况。
太长的文章我没有信心写完所以打算一篇一篇写这是第一篇关于我在Obsidian里面做的一些面子工程。
## 个人偏好
虽然本人姑且算是一个程序员但是我喜欢All in Light mode喜欢小的字体15、14px左右、喜欢低饱和的配色比如[Nord](https://www.nordtheme.com/)、Catppuccin这种喜欢纤细扁平的UI风格如果有一点干净清透的阴影就更好了还喜欢有一点圆角的图片我是说4px左右
所以我的配置也是这种风格的,请看目前的配置:
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/08/fd56898ab165f666cbddc9805ce751cf.png)
其实对于目前的样式我是有一些不满意的就是……左边工具栏好多风格不一的icon而且都是些我不太用得上能没事……再忍忍等写到插件篇我会去整理的。
## 基础样式
### 字体
#### 字体选择策略
忘记在哪里看到过衬线体适合阅读无衬线体适合用作界面UI字体因为无衬线体更简洁容易辨别认知负担小。
所以我在Obsidain上也是采取这样的策略目前我的字体设置
- 界面字体:[阿里巴巴普惠体2.0](https://done.alibabadesign.com/puhuiti2.0)
- 正文字体:
- 英文Spectral
- 中文:朱雀仿宋
目前的正文字体比较正式,像印刷体,之前为了增加记笔记的趣味性,也用过这些搭配:
- 界面字体:
- iA Writer Quatto S
- 正文字体:
- 英文iA Writer Quatto S
- 中文:[LXGW Bright](https://github.com/lxgw/LxgwBright) (这个字体中英文都很美丽,也可以中英文共用一个字体)
代码字体一直都是Jetbrains Mono Nerd Font因为Nerd Font支持很多Logo所以我很喜欢可以在这里选择自己喜欢的下载[Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher](https://www.nerdfonts.com/font-downloads) 顺带一提我在IDE也用的 Jetbrains Mono Nerd Font。
字体大小是15px。
#### 如何分别设置中英文字体
Obsidian上的字体设置有点像CSS里面的有优先级和Fallback越上面的字体优先级越高当上面的字体无法找到对应的字时就会回落到下一个字体设置。
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/09/925e05b9f0bc126f9a938d90a26c449d.png)
比如说上图中的字体Spectral为英文字体没有中文字符所以当Spectral中没有中文字符的时候就会使用Zhuque Fangsong中的字体所以我们可以把英文字体放在第一个然后中文字体放在第二个以此来分别设置中英文的字体。
我比较奇怪在网上看到比较好看的网页字体时会马上F12去查看用了什么字体然后想办法下载到电脑上最后收集了好多漂亮的字体但又总是用回那几个。
### 堆叠标签页
默认状态下Obsidian的标签页是像浏览器那样水平一个一个横着延展的
![默认状态](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/09/f256f5cb226ac938b18182bac56ec097.png)
但是我喜欢设置成像书本一样堆叠的标签页:
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/09/38b1d9b6f9550f95b7994e8c2db6d3e7.png)
如果用可以用滚轮左右滑动的鼠标就很方便,比如说我用的魔法老鼠和触控板,手指轻轻一滑就可以左右滑动切换页面,也许这也是我为什么还在用魔法老鼠的原因之一吧。
设置方法如下:
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/09/1205242b29ee886599ddae19c02f25a5.png)
题外话:
这个设置我都忘了什么时候设置的了上次朋友问我找了好久。这个功能在我一开始用Obsidian的时候是没有的我是在[+ Start Here - LYT Kit](https://notes.linkingyourthinking.com/Cards/%2B+Start+Here)的设置教程里看到的,当时是用一个叫 [Sliding Panes](https://github.com/deathau/sliding-panes-obsidian) 来设置的最近一年多才加上堆叠标签页的功能。于是我就把Sliding Panes卸载了现在社区里也找不到这个插件了。
### 其他
- 我没有修改Obsidain的icon即使我觉得不好看但是也不是不能看所以就懒得换了。
- 没有开启半透明效果
- 没有开启自动Dark Mode, 再说了,电脑夜如白昼的话,开了也相当于没开。
## 主题
### Things
用了很久的 [Things](https://github.com/colineckert/obsidian-things) 这个主题的风格比较正式、整洁标签的样式也很清新我曾经参照Nord的配色修改了各个标题的颜色但后面不知道为什么不见了这个主题下的图片有很漂亮的圆角和阴影我很喜欢。但我还是慢慢地厌倦了。
![things](https://github.com/colineckert/obsidian-things/raw/main/assets/main-demo.png)
### Minimal
在很长一段时间,直到今天我都在用[Minimal](https://minimal.guide/home) 这个主题这是我最喜欢的主题它简洁优雅没有对Obsidian本体做太多UI上的修改就使得整个界面焕然一新就像人剪了个适合自己的发型那样还能看出来是自己。好烂的比喻
Minimal 主题最好配合插件[Minimal Theme Setting](obsidian://show-plugin?id=obsidian-minimal-settings)使用配合插件可以使用更多的配色做更多细致的调整。我最喜欢的配色是Nord配色加上Background Contrast设置为All LightAll Light 模式下底色更白更统一一点插件里还有E-ink主题有墨水屏显示器的朋友可以试一下。
Minimal Theme setting 中可选的主题:
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/09/e4bd4b04cf8772158407b307fca1fc1d.png)
我还喜欢用彩色的Heading需要在插件中打开这个
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/09/0b8c21f7f9427a82d4ce1d03d00c78dc.png)
其他的设置参考上图我习惯只对外链用下划线内链不用这样我能比较容易地区分链接类型然后status bar(右下角的那条东西) 也全隐藏起来。
对了Minimal还有一个很好的功能就是对Checklist的样式做了特别的CSS感觉很像Bullet Journal里面的list可以参考[Checklists - Minimal Documentation](https://minimal.guide/checklists)
大概是这个样子:
![](https://publish-01.obsidian.md/access/342b33803baa5ad0055c9141648edad3/Images/alt-checkboxes.png)
其实我还装了很多其他的主题,但我已经不再使用它们了,所以不再赘述。
## 美观用的插件
### Hider
[GitHub - kepano/obsidian-hider: Hide Obsidian UI elements such as tooltips, status, titlebar and more](https://github.com/kepano/obsidian-hider)
一个可以自定义隐藏部分Obsidian UI组件的插件比如说隐藏Scroll Bar之类的和Minimal是同一个作者也就是现在Obsidian的CEO[^1]。其实这个插件我已经没有在用了可能是Minimal Theme Setting里已经包含了其中的功能所以我不太用得上了但是因为已经用了两年多所以还是列一下。
### Style Setting
[GitHub - mgmeyers/obsidian-style-settings: A dynamic user interface for adjusting theme, plugin, and snippet CSS variables within Obsidian](https://github.com/mgmeyers/obsidian-style-settings)
这个插件可以用于调整很多主题的颜色配置等细节如果那个主题支持的话像上面提到的Things, Minimal都可以在这里调整。
因为我很少用H1大标题总是从H2开始所以我给Minimal的H2标题加了下划线可以这样设置
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/09/1a4e56516bfea93f0c2ba65dbf86bd59.png)
### Admonitions
[GitHub - javalent/admonitions: Adds admonition block-styled content to Obsidian.md](https://github.com/javalent/admonitions)
给Obsidian里的Callout Block添加动画效果我比较少用Callout但是样式我挺喜欢的。
### List Callouts
[GitHub - mgmeyers/obsidian-list-callouts: Create callouts in lists in Obsidian.](https://github.com/mgmeyers/obsidian-list-callouts)
可以给List加上icon和颜色的插件因为我记不住符号所以不怎么用但我很喜欢。
Demo
![](https://raw.githubusercontent.com/mgmeyers/obsidian-list-callouts/main/screenshots/01.png)
### File Explorer Count
文件夹内文件数量显示的插件,这应该也算是界面美观的一种?很实用。本文最开头提到的计数就是用这个插件算出来的。
![](https://github.com/ozntel/file-explorer-note-count/raw/main/images/folder-count.png)
### Lapel
[GitHub - liamcain/obsidian-lapel: 🤵 Dress up your editor. Obsidian plugin to show the heading level in the gutter.](https://github.com/liamcain/obsidian-lapel)
一个在编辑器左侧显示Heading层次的插件说不上有什么用但觉得还是有点用。我一直开着。
[^1]: 时间过得真快我一开始用他插件的时候他还只是一个活跃的用户呢结果某天就变成了CEO

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -0,0 +1,117 @@
---
title: 为Obsidian添加仿真荧光笔高亮样式
created: 2024-10-14
summary: Subtle highlight style for Obsidian
tags:
- Obsidian
- CSS
---
效果如图:
![](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/10/0822652da55dab7b75749172c24e96a7.png)
参考:
<iframe height="300" style="width: 100%;" scrolling="no" title="Subtle text &quot;highlighter&quot; in pure CSS" src="https://codepen.io/cassidoo/embed/JjQOBZB?default-tab=html%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
See the Pen <a href="https://codepen.io/cassidoo/pen/JjQOBZB">
Subtle text &quot;highlighter&quot; in pure CSS</a> by Cassidy (<a href="https://codepen.io/cassidoo">@cassidoo</a>)
on <a href="https://codepen.io">CodePen</a>.
</iframe>
鉴于安装的插件和CSS样式太多我强制用了`!important`, 所以代码比较丑陋。
## 如何安装
### 1. 安装插件highlightr
如果只需要黄色样式的高亮效果,则不需要安装这个插件。
安装链接:[obsidian://show-plugin?id=highlightr-plugin](obsidian://show-plugin?id=highlightr-plugin)
highlight method设置为`css-classed`
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/10/c17d53615dfbfb0d72767e885cd01b03.png)
### 2. 安装CSS代码片段
首先打开CSS代码片段存放的文件夹
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/10/8bc2771da002bf9ba87da2a320dca5ef.png)
然后点击 -> [subtle-hightlight.css](/2024-10-14-obsidian-highlight/subtle-highlight.css)下载css代码下载后将`subtle-highlight.css`存到代码片段的文件夹中
或者复制下面的代码后在该文件夹下创建一个叫`subtle-highlight.css` 的文件:
```css
span.cm-highlight{
background: linear-gradient(
100deg,
#ffffaf00 1%,
#ffffaf 2.5%,
#ffffaf80 5.7%,
#ffffaf1a 93%,
#ffffafb4 95%,
#ffffaf00 98%
),
linear-gradient(182deg, #ffffaf00, #ffffaf4d 8%, #ffffaf00 15%) !important;
}
mark:not([class]) {
background: linear-gradient(
100deg,
#ffffaf00 1%,
#ffffaf 2.5%,
#ffffaf80 5.7%,
#ffffaf1a 93%,
#ffffafb4 95%,
#ffffaf00 98%
),
linear-gradient(182deg, #ffffaf00, #ffffaf4d 8%, #ffffaf00 15%) !important;
}
.hltr-pink {
background: linear-gradient(
100deg,
#ffafd400 1%,
#ffafd4 2.5%,
#ffafd480 5.7%,
#ffafd41a 93%,
#ffafd4b4 95%,
#ffafd400 98%
),
linear-gradient(182deg, #ffafd400, #ffafd44d 8%, #ffafd400 15%) !important;
}
.hltr-green {
background: linear-gradient(
100deg,
#b8ffaf00 1%,
#b8ffaf 2.5%,
#b8ffaf80 5.7%,
#b8ffaf1a 93%,
#b8ffafb4 95%,
#b8ffaf00 98%
),
linear-gradient(182deg, #b8ffaf00, #b8ffaf4d 8%, #b8ffaf00 15%) !important;
}
.hltr-blue {
background: linear-gradient(
100deg,
#afd7ff00 1%,
#afd7ff 2.5%,
#afd7ff80 5.7%,
#afd7ff1a 93%,
#afd7ffb4 95%,
#afd7ff00 98%
),
linear-gradient(182deg, #afd7ff00, #afd7ff4d 8%, #afd7ff00 15%) !important;
}
```
添加css文件后点击左边的“重新加载按钮”
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/10/9fcc32f430e89f8d2c8df0fb439cb794.png)
找到该文件后打开:
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/10/c1fd16cb24eddba9c8f06f22dc3d1316.png)
然后就可以啦
## 如何使用
对于黄色来说,用 `==需要高亮的内容==` 就可以了而对于其他颜色安装highlightr之后选择需要高亮的文字然后右键选择颜色即可如图
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/10/de7d4b2c0c9c0ecef9954799b1ef723a.png)
目前只有粉色、绿色、蓝色有荧光笔仿真效果。
![image.png](https://usc1.contabostorage.com/cc0b816231a841b1b0232d5ef0c6deb1:image/2024/10/846a1a137fdac60940dd55f3d4d730bb.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

View file

@ -0,0 +1,65 @@
span.cm-highlight{
background: linear-gradient(
100deg,
#ffffaf00 1%,
#ffffaf 2.5%,
#ffffaf80 5.7%,
#ffffaf1a 93%,
#ffffafb4 95%,
#ffffaf00 98%
),
linear-gradient(182deg, #ffffaf00, #ffffaf4d 8%, #ffffaf00 15%) !important;
}
mark:not([class]) {
background: linear-gradient(
100deg,
#ffffaf00 1%,
#ffffaf 2.5%,
#ffffaf80 5.7%,
#ffffaf1a 93%,
#ffffafb4 95%,
#ffffaf00 98%
),
linear-gradient(182deg, #ffffaf00, #ffffaf4d 8%, #ffffaf00 15%) !important;
}
.hltr-pink {
background: linear-gradient(
100deg,
#ffafd400 1%,
#ffafd4 2.5%,
#ffafd480 5.7%,
#ffafd41a 93%,
#ffafd4b4 95%,
#ffafd400 98%
),
linear-gradient(182deg, #ffafd400, #ffafd44d 8%, #ffafd400 15%) !important;
}
.hltr-green {
background: linear-gradient(
100deg,
#b8ffaf00 1%,
#b8ffaf 2.5%,
#b8ffaf80 5.7%,
#b8ffaf1a 93%,
#b8ffafb4 95%,
#b8ffaf00 98%
),
linear-gradient(182deg, #b8ffaf00, #b8ffaf4d 8%, #b8ffaf00 15%) !important;
}
.hltr-blue {
background: linear-gradient(
100deg,
#afd7ff00 1%,
#afd7ff 2.5%,
#afd7ff80 5.7%,
#afd7ff1a 93%,
#afd7ffb4 95%,
#afd7ff00 98%
),
linear-gradient(182deg, #afd7ff00, #afd7ff4d 8%, #afd7ff00 15%) !important;
}

View file

@ -0,0 +1,125 @@
---
title: Git使用随记
created: 2024-10-28
summary: git alias,git add -A,git add .
tags:
- Git
---
## 最近常用Alias
### git random
功能:在制定的某个时间段内随机提交,并且每次提交都要比前次提交时间晚,适用于 MacOS、Linux其他系统未经验证。
比如说今晚22:00到明天3:00之间
```bash
git config --global alias.random '!f() {
# 获取最后一次提交的时间戳
last_commit_time=$(git log -1 --format=%ct 2>/dev/null)
# 如果没有之前的提交,使用当前时间作为基准
if [ -z "$last_commit_time" ]; then
last_commit_time=$(date +%s)
fi
# 计算下一个可用的时间戳(最后提交时间 + 1分钟
next_available_time=$((last_commit_time + 60))
# 获取今天 22:00 的时间戳
if [[ "$OSTYPE" == "darwin"* ]]; then
# MacOS
today=$(date -v22H -v00M -v00S +%s)
tomorrow=$(date -v+1d -v02H -v59M -v59S +%s)
else
# Linux
today=$(date -d "$(date +%Y-%m-%d) 22:00:00" +%s)
tomorrow=$(date -d "$(date -d tomorrow +%Y-%m-%d) 02:59:59" +%s)
fi
# 确保下一个可用时间在今天 22:00 到明天 02:59 之间
if [ $next_available_time -lt $today ]; then
next_available_time=$today
elif [ $next_available_time -gt $tomorrow ]; then
next_available_time=$tomorrow
fi
# 在下一个可用时间和明天 02:59 之间随机选择一个时间
if [[ "$OSTYPE" == "darwin"* ]]; then
# MacOS
random_time=$(jot -r 1 $next_available_time $tomorrow)
FISH_DATE=$(date -r $random_time "+%Y-%m-%d %H:%M:%S")
else
# Linux
random_time=$(shuf -i $next_available_time-$tomorrow -n 1)
FISH_DATE=$(date -d "@$random_time" "+%Y-%m-%d %H:%M:%S")
fi
# 如果没有提供提交信息,使用默认信息
commit_message=${1:-"Random commit at $FISH_DATE"}
# 设置环境变量并提交
GIT_AUTHOR_DATE="$FISH_DATE" \
GIT_COMMITTER_DATE="$FISH_DATE" \
git commit -m "$commit_message"
}; f'
```
### git add -A + git commit -m "" 合并,快速提交
设置:
```bash
git config --global alias.fast '!git add -A && git commit -m'
```
使用:
```bash
git fast "Your commit message here"
```
### undo
撤销最后一次commit但保留所有更改
设置:
```bash
git config --global alias.undo 'reset --soft HEAD^'
```
使用:
```bash
git undo
```
### cancel
完全撤销最后一次commit丢弃所有更改
设置:
```bash
git config --global alias.cancel 'reset --hard HEAD^'
```
使用:
```bash
git cancel
```
### `git add -A``git add .` 的区别
一年多前和朋友讨论过这个问题,但是我没太理解,我一直用的是 git add -A。最近突然懂了因为`.` 表示的是当前目录,所以 `git add .` 只会添加当前目录以及其子目录下的改动(类似于相对路径);而 A 表示 All所以 `git add -A `会添加整个工作区的变动,不管在哪个目录执行。
不过如果在根目录下执行,这两个命令就是等价的。
### Git 学习资料
按推荐程度排序:
- [Learn Git Branching](https://learngitbranching.js.org/):既有图形可视化,又有跟使用场景贴近的练习,文字讲解也很清晰,但个人建议阅读繁体版本。
- [Oh My Git!](https://ohmygit.org/): 游戏化的教程,很有意思,但还是有点抽象,跟实际场景不是特别贴切。
- [gitchat](https://wkevin.github.io/GitChat/gitchat.html#round-1-%E8%B5%B7%E6%AD%A5): 风趣易懂的文字教程
- [Learn Git with Bitbucket Cloud | Atlassian Git Tutorial](https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud)
- [Pro Git 第二版(中文版) · 看云](https://www.kancloud.cn/kancloud/progit)
- [Git Time](https://git.bradwoods.io/)一个交互式的Git教程/游戏,更像玩游戏,玩了没记住什么(
## 其他
- [git cheatsheet](https://ndpsoftware.com/git-cheatsheet.html)
- [github skills](https://skills.github.com/)
- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
借此机会,我对之前的文章:[Git · 常用操作笔记](https://seviche.cc/2022-05-25-git/) 中的命令表格进行了更新。

View file

@ -8,7 +8,6 @@ flags:
<script lang="ts">
import Profile from '$lib/components/extra/profile.svelte'
</script>
<Profile subname="sevichecc" bio={`An ordinary front-end engineer who spends her days wrestling with CSS and JavaScript at work, but dreams about the exciting world of backend development at night.`} >
<div class="flex flex-col md:flex-row gap-4 mt-4">
@ -23,7 +22,7 @@ flags:
</div>
</Profile>
我是 Seviche意为「酸橘汁腌鱼」,这是朋友给我起的名字,你也可以叫我「鱼」。大学的时候在学工业设计,然后现在在学前端和后端,对 UX/交互设计也有一些了解。
我是Sevi之前叫Seviche意为「酸橘汁腌鱼」,这是朋友给我起的名字,你也可以叫我「鱼」。大学的时候在学工业设计,然后做了一段时间的前端开发,现在在做全栈开发,对 UX/交互设计也有一些了解。
这里是我的部落格,随便看看喔。
@ -31,15 +30,15 @@ flags:
### 姑且熟悉
`JavaScript` `TypeScript` `React` `Redux` `Next.js` `Vue.js` `Nuxt.js` `TailwindCSS` `SASS`
`JavaScript` `Vue.js` `Nuxt.js` `TypeScript` `React` `Redux` `Next.js` `TailwindCSS` `SASS` `GO`
### 简单用过
`GO` `Shell Script` `Svelte` `Deno JS` `NodeJS` `Express.js` `Mongoose` `MongoDB` `Prisma`
`Shell Script` `Svelte` `NodeJS` `Express.js` `Mongoose` `MongoDB` `Prisma` `MySQL`
### 了解
`MySQL` `Styled Components`
`Styled Components` `Deno JS`
## 最近