Skip to content

Commit 49437c0

Browse files
committed
git: archive(好家伙,一看时间已经过12点了)
学地有点小入迷了这次 Signed-off-by: LetMeFly666 <[email protected]>
1 parent 156bd37 commit 49437c0

File tree

3 files changed

+42
-36
lines changed

3 files changed

+42
-36
lines changed

Solutions/Other-Accumulation-SomeTips.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ git clone --branch 要clone的分支 --single-branch 仓库地址
2222
git clone --branch paper --single-branch [email protected]:LetMeFly666/SecFFT.git
2323
```
2424

25-
### 一些命令
25+
### 一些命令(学Git)
2626

2727
#### 版本回退
2828

@@ -37,9 +37,35 @@ git reset --hard HEAD^
3737

3838
其中`--hard`会回退到上个版本的已提交状态,`--soft`会回退到上个版本的未提交状态,`--mixed`会回退到上个版本已添加但未提交的状态。
3939

40-
#### git reflog
40+
#### 查看日志/commit记录
4141

42-
引用日志。
42+
**git log**查看commit记录
43+
44+
```bash
45+
git log
46+
```
47+
48+
会显示历史commit信息,每个commit会显示Author、Date、Message、Merge等很多信息(很多行)。
49+
50+
```bash
51+
git log --pretty=oneline
52+
```
53+
54+
一个commit只显示一行,会显示(其他分支和)commit信息。
55+
56+
```bash
57+
git log --graph --pretty=oneline --abbrev-commit
58+
# 例如:
59+
# * 156bd3741c9 (HEAD -> master, origin/master) Merge pull request #625 from LetMeFly666/825
60+
# |\
61+
# | * 017b500caee (origin/825) update: 添加问题“825.适龄的朋友”的代码和题解
62+
# |/
63+
# * c1c305688b4 Merge pull request #623 from LetMeFly666/3240
64+
```
65+
66+
以图的形式显示分支及合并记录。
67+
68+
**git reflog**查看引用日志。
4369

4470
假如我使用了`git reset`回到了历史版本,我如何回来呢?可以`git reflog`查看回退前的commit id,然后`git reset --hard COMMIT_ID`
4571

@@ -61,6 +87,17 @@ git reset HEAD filename
6187

6288
会把filename文件的更改从暂存区回退到工作区。
6389

90+
#### 切换分支
91+
92+
+ 创建并切换分支:`git checkout -b NEW_BRANCH``git switch -c NEW_BRANCH`
93+
+ 切换分支:`git checkout BRANCH``git switch NEW_BRANCH`
94+
95+
本来切换分支也是`git checkout`,但是由于`checkout`和丢弃工作区文件太像了,所以新版本git支持了switch命令
96+
97+
#### 分支合并
98+
99+
TODO: https://liaoxuefeng.com/books/git/branch/policy/index.html#0
100+
64101
## About HTML
65102

66103
### 空白字符
@@ -307,7 +344,7 @@ Pyinstaller打包可执行文件时若系统变量里有upx,则打包出来的
307344

308345
### Win10右下角托盘区时间显示到秒
309346

310-
`Win + R` -> `regedit` -> `回车`,定位到`计算机\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced`并新建`DWORD (32位)值(D)`将值修改为`1`,重启`explorer.exe`
347+
`Win + R` -> `regedit` -> `回车`,定位到`计算机\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced`并新建`DWORD (32位)值(D)`名为`ShowSecondsInSystemClock`值为`1`,重启`explorer.exe`
311348

312349
## About Phone
313350

temp-PythonTeaching.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: LetMeFly
33
* @Date: 2024-11-11 22:43:08
44
* @LastEditors: LetMeFly.xyz
5-
* @LastEditTime: 2024-11-17 14:50:55
5+
* @LastEditTime: 2024-11-18 00:02:29
66
-->
77
俺也先列个题纲,周一找杨老师准备:
88

@@ -12,12 +12,3 @@
1212
4. JS项目陆续后续会议快结了,学弟们不怎么懂
1313
5. JS要对接成电
1414
6. 进度缓慢的焦虑、怕干不好项目的焦虑
15-
16-
17-
ToYou:
18-
19-
1. 豆包MarsCodes发布会
20-
2. RUC跆拳道er
21-
3. 北邮VPN+手机热点 为何不能访问校内资源(之前解释有误)
22-
4. jk专家咨询费
23-

tryGo/JSFUZZ.bash

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)