install git-lfs on ubuntu and use it

本文详细介绍了如何在Ubuntu环境下安装和配置Git LFS,包括下载安装Git命令行扩展,设置Git LFS管理特定文件类型,以及确保.gitattributes文件被跟踪的方法。通过简单的步骤,用户可以轻松管理大文件,并正常进行提交和推送操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://stackoverflow.com/questions/48734119/git-lfs-is-not-a-git-command-unclear

Ubuntu

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

sudo apt-get install git-lfs

After installing, you can install using:

git lfs install

////////////////////////////////////

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

Getting Started
Download and install the Git command line extension. You only have to set up Git LFS once.

git lfs install
Select the file types you’d like Git LFS to manage (or directly edit your .gitattributes). You can configure additional file extensions at anytime.

git lfs track “*.psd”
Make sure .gitattributes is tracked

git add .gitattributes
There is no step three. Just commit and push to GitHub as you normally would.

git add file.psd
git commit -m “Add design file”
git push origin master

/home/zrd/miniconda3/envs/habitat/lib/python3.9/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4 warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}" error: unrecognized arguments: --~/zrd usage: datasets_download.py [-h] [--uids [UIDS ...] | --list] [--data-path DATA_PATH] [--clean | --replace | --no-replace] [--username USERNAME] [--password PASSWORD] [--no-prune] optional arguments: -h, --help show this help message and exit --uids [UIDS ...] Unique ID of the data to download. --list List available datasource uid options and exit. --data-path DATA_PATH Optionally provide a path to the desired root data/ directory. Default is "habitat-sim/data/". --clean Remove nested child directories for the datasource. --replace If set, existing equivalent versions of any dataset found during download will be deleted automatically. Otherwise user will be prompted before overriding existing data. --no-replace If set, existing equivalent versions of any dataset found during download will be skipped automatically. Otherwise user will be prompted before overriding existing data. --username USERNAME Username to use for downloads that require authentication --password PASSWORD Password to use for downloads that require authentication --no-prune Optionally disable pruning for git-lfs repo datasources. Use this if your system git version does not support forced pruning (e.g. Ubuntu 20.x).
07-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值