cd /tmp/back
ls -al
total 145636
drwxr-xr-x 2 xxx xxx 4096 Jan 17 11:04 .
drwxrwxrwt 18 root root 4096 Jan 17 10:44 ..
-rw-r--r-- 1 root root 45 Jan 16 18:40 imitation.tar.gz
-rw-r--r-- 1 root root 146996064 Jan 16 18:40 wp.bak.tar.gz
-rw-r--r-- 1 xxx xxx 2114053 Jan 16 18:40 wp.sql.bak.tar.gz
wp.bak.tar.gz is a large 140m file
I now want to push all the files in the entire / tmp/back folder to my github.
1.install lfs
curl-s https://packagecloud.io/insta. | sudo bash
sudo apt-get install git-lfs
git lfs install
all files in 2.push / tmp/back
cd /tmp/back
git init
git lfs track ./wp.bak.tar.gz
git add .gitattributes
git add *
git commit -m "Add large file"
git remote add origin https://github.com/xxxx/yyyy.git
git push origin master
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 751fb70b058bd398791f7a04ba313ea5
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File wp.bak.tar.gz is 140.19 MB; this exceeds GitHub"s file size limit of 100.00 MB
To https://github.com/xxxx/yyyy.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to "https://github.com/xxxx/yyyy.git"
excuse me, how to deal with it?