Skip to content

Instantly share code, notes, and snippets.

@erichsu
Created May 21, 2019 13:58
Show Gist options
  • Save erichsu/3b61dfbdec6551f7b4a6cabafec116a1 to your computer and use it in GitHub Desktop.
Save erichsu/3b61dfbdec6551f7b4a6cabafec116a1 to your computer and use it in GitHub Desktop.
Git LFS setup
## 首次使用 Git LFS
# 安裝 Git LFS CLI
brew install git-lfs
# 在 repo 位置下
git lfs install
## 設定 Git LFS 自定義位址
git config -f .lfsconfig lfs.url http://<UserName>@<SERVER>:3000/<User>/<Project>.git/info/lfs
## 將設定檔加入 Git 追蹤
git add .lfsconfig
## 定義大檔案位置
git lfs track **/Carthage/Build/**
git lfs track **/Pods/**
## 查看 LFS 檔案狀態
git lfs status
## 上傳
git push
## 或者只上傳 LFS 檔案
git lfs push origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment