jinzishuai / learn2deeplearn

A repository of codes in learning deep learning
GNU General Public License v3.0
13 stars 1 forks source link

explore git-lfs to deal with large files #46

Open jinzishuai opened 6 years ago

jinzishuai commented 6 years ago

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

jinzishuai commented 6 years ago

Windows Laptop: no need to download anything, git lfs is there already

$ git lfs install
Updated git hooks.
Git LFS initialized.
$ git lfs track "*.zip"
Tracking "*.zip"
$ git add .gitattributes
jinzishuai commented 6 years ago

image

jinzishuai commented 6 years ago

example large file

https://github.com/jinzishuai/learn2deeplearn/blob/master/google_dl_udacity/Deep%20Learning%20Videos.zip

jinzishuai commented 6 years ago

Ubuntu 16 VBox: git lfs is not installed

seki@seki-VirtualBox:~/src/learn2deeplearn/google_dl_udacity$ git lfs
git: 'lfs' is not a git command. See 'git --help'.

Did you mean this?
    log
seki@seki-VirtualBox:~/src/learn2deeplearn/google_dl_udacity$ ls -lh
total 12K
-rw-rw-r-- 1 seki seki  134 Mar 18 22:10 Deep Learning Videos.zip
drwxrwxr-x 2 seki seki 4.0K Mar 18 22:10 lesson1
-rw-rw-r-- 1 seki seki  290 Mar 18 22:10 REAME.md
seki@seki-VirtualBox:~/src/learn2deeplearn/google_dl_udacity$ cat Deep\ Learning\ Videos.zip 
version https://git-lfs.github.com/spec/v1
oid sha256:61aaafbd334010b37a621e2881725b91fa06febcd86a0f2e66638c0e4e5feea1
size 130218927
seki@seki-VirtualBox:~/src/learn2deeplearn/google_dl_udacity$ 
jinzishuai commented 6 years ago

install lfs on U16

ref: https://packagecloud.io/github/git-lfs/install

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

to actually download the LFS tracked files on a machine: use fetch and checkout

image