9
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

git lfs のインストール手順メモ

Posted at

git lfsについて

Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

オーディオやビデオ等のサイズが大きなデータをgitで管理する仕組み。
ファイル差分を管理するというよりは、ポインタで管理している模様。

手順

基本的に以下を参考にすればOK

https://github.com/git-lfs/git-lfs/wiki/Installation

ubuntuの場合は以下を参照する

Debian and Ubuntu
Ubuntu 18.04, Debian 10, and newer versions of those OSes offer a git-lfs package. If you'd like to use that and don't need the latest version, skip step 1 below.

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install

Docker Recipes(For Debian Distros)は以下を参照する

Docker Recipes
For Debian Distros, you can use

RUN build_deps="curl" && \
   apt-get update && \
   DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${build_deps} ca-certificates && \
   curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
   DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git-lfs && \
   git lfs install && \
   DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove ${build_deps} && \
   rm -r /var/lib/apt/lists/*

過去バージョン(tar.gz形式)を取得する場合は以下のようにするとよさそう
https://github.com/git-lfs/git-lfs/releases

wget https://github.com/git-lfs/git-lfs/releases/download/v2.13.3/git-lfs-linux-amd64-v2.13.3.tar.gz
tar -xf git-lfs-linux-amd64-v2.13.3.tar.gz
bash install.sh
git lfs install  # 対象ユーザで実行

バージョン確認は以下のようにすればOK

git lfs --version

参考

9
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?