vault backup: 2025-12-08 14:46:06

Affected files:
22.01. 軟體工具、設定/git/lfs.md
22.01. 軟體工具、設定/git/pull.md
This commit is contained in:
2025-12-08 14:46:06 +08:00
parent 1cd44f7813
commit 57f21af506
2 changed files with 45 additions and 0 deletions

View File

@@ -10,4 +10,14 @@ description:
git lfs track "*.psd"
```
## 用 `git lfs migrate` 把歷史中的大檔案改寫成 LFS
```shell
git lfs migrate import --include="path/to/your/large-file" --everything
```
## 移除已經 commit 的大檔案
```shell
git filter-repo --path "path/to/your/large-file" --invert-paths
```
# 參考來源

View File

@@ -0,0 +1,35 @@
---
tags:
aliases:
date: 2025-12-08
time: 14:39:38
description:
---
`git pull` 的時候發生錯誤:
```shell
╰─ git pull
remote: Enumerating objects: 1678, done.
remote: Counting objects: 100% (1678/1678), done.
remote: Compressing objects: 100% (543/543), done.
remote: Total 1678 (delta 1038), reused 1649 (delta 1009), pack-reused 0 (from 0)
Receiving objects: 100% (1678/1678), 15.66 MiB | 6.67 MiB/s, done.
Resolving deltas: 100% (1038/1038), done.
From github.com-logi:RobotRunTeam/AutoServer
+ e30ee52...a30d519 main -> origin/main (forced update)
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
```
# 參考來源