23 lines
417 B
Markdown
23 lines
417 B
Markdown
---
|
|
tags:
|
|
aliases:
|
|
date: 2025-12-08
|
|
time: 11:18:45
|
|
description:
|
|
---
|
|
## 將檔案交由 LFS 管理
|
|
```shell
|
|
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
|
|
```
|
|
|
|
# 參考來源 |