|
|
@@ -5,6 +5,8 @@ draft: false
|
|
|
tags: []
|
|
|
---
|
|
|
|
|
|
+## tag
|
|
|
+
|
|
|
### 拉取所有远程 tags
|
|
|
|
|
|
```shell
|
|
|
@@ -17,6 +19,17 @@ $git fetch --all --tags
|
|
|
$git checkout tags/<tag_name> -b <new_branch_name>
|
|
|
```
|
|
|
|
|
|
+### 删除 tag
|
|
|
+
|
|
|
+```shell
|
|
|
+# 删除本地 tag
|
|
|
+$git tag -d <tag_name>
|
|
|
+# 删除远程 tag
|
|
|
+$git push origin :refs/tags/<tag_name>
|
|
|
+```
|
|
|
+
|
|
|
+## git config
|
|
|
+
|
|
|
### Ignore ^M as a newline when execute 'git diff'
|
|
|
|
|
|
```shell
|
|
|
@@ -24,6 +37,8 @@ $git config --global core.autocrlf true
|
|
|
$git config --global core.whitespace cr-at-eol
|
|
|
```
|
|
|
|
|
|
+## git log
|
|
|
+
|
|
|
### 查看指定文件修改历史
|
|
|
|
|
|
```shell
|
|
|
@@ -36,6 +51,8 @@ $git log --pretty=oneline [--oneline] <filename>
|
|
|
$git show <commit>
|
|
|
```
|
|
|
|
|
|
+## 撤销
|
|
|
+
|
|
|
### 撤销 git add
|
|
|
|
|
|
```shell
|