<git-lfs>

git-lfs : Large File Storage


https://github.com/caffe2/models.git

Caffe2 Model Zoo를 Clone 받는데 파일 사이즈가 커서, clone 받으려면 git-lfs가 필요했다


sudo apt-get install software-properties-common

sudo add-apt-repository ppa:git-core/ppa

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

sudo apt-get install git-lfs

git lfs install


<깃허브 서브디렉토리만 클론받기>

이제 git clone 받으면 된다

그런데, 내가 필요한 건 일부 파일/디렉토리고, 전체를 clone 받기에는 불필요한 파일 사이즈들이 너무 컸다

그래서 일부분만 clone 받는 내용에 대하여 구글링해보았더니 아래 URL에 해당 내용이 있었다 (sparse checkout)


https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository/13738951#13738951


---


<Issues on windows>

cmd 또는 powershell로 하지말고, git-bash를 사용하자

character encoding이나 line ending issue인듯 하다

https://stackoverflow.com/questions/23289006/on-windows-git-error-sparse-checkout-leaves-no-entry-on-the-working-directory


참고: 

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



WRITTEN BY
hojongs
블로그 옮겼습니다 https://hojongs.github.io/

윈도우즈 7 기준


사용자 계정 - 다른 계정 관리 - 새 게정 만들기

새 계정 이름은 my-guest라고 가정. my-guest에 암호도 걸어주자


폴더 우클릭 - 공유 대상 - 특정 사용자 - my-guest 추가




sudo apt-get install -y samba-client cifs-utils

리눅스에 필요한 패키지들 설치



<smbclient를 통해 공유폴더 리스트 확인>

smbclient -L 윈도우즈IP -U my-guest

공유폴더 리스트가 뜨고 그 아래에

Connection to 윈도우즈IP failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)

NetBIOS over TCP disabled -- no workgroup available

이런 메세지가 뜨는데, 에러 아니다




<공유폴더 mount 시키기>

다른 방법도 있지만 mount가 가장 편리하다

sudo mkdir /mnt/공유폴더이름

sudo mount -t cifs //윈도우즈IP/공유폴더이름 /mnt/공유폴더이름 -o username=my-guest

ls -l /mnt/공유폴더이름

윈도우즈 공유폴더가 암호와 함께 잘 마운트되었음을 확인할 수 있다




<mount 해제방법>

sudo umount /mnt/공유폴더이름




참조: 

http://linuxstory1.tistory.com/entry/smbclient-%EC%82%AC%EC%9A%A9%EB%B0%A9%EB%B2%95

https://openwiki.kr/tech/mount_cifs


'Linux' 카테고리의 다른 글

Raspberry Pi make 에러  (1) 2017.12.04
[Linux] .vimrc on docker win7  (0) 2017.11.30
[Linux] hash -r 기능  (0) 2017.11.29
[git] ubuntu git-lfs install & git clone subdirectory  (0) 2017.11.29
[docker] vim arrow keys don't working on windows  (0) 2017.11.25

WRITTEN BY
hojongs
블로그 옮겼습니다 https://hojongs.github.io/

My Environment

OS: Windows7 (win7)

Program: Docker (VirtualBox based)

Docker Image: Caffe2 0.8.1 ubuntu


I have had vim key mapping issue.

In detail, I press any arrow key, then I get "E349: No identifier under cursor" or "E388: couldn't find definition"


It is because of "term variable" that is embedded environment variable in VIM

using follow command in vim, you can get your value of term variable, 

:set term?

my value was "xterm", and it cause the issue


So I changed it, see below

:set term=cygwin

Finally the issue is solved, term=xterm or term=ansi, compatible(cp) or nocompatible(nocp) is not good solution for me

try above command


you can set it automatically

echo "set term=cygwin" >> /etc/vim/vimrc


In addition, if term's value is xterm, you can use "hjkl" instead of "arrow keys"


Reference Site: https://superuser.com/questions/843876/cygwin-terminal-backspace-and-arrow-keys-not-working




WRITTEN BY
hojongs
블로그 옮겼습니다 https://hojongs.github.io/

사용중인 블로그 스킨이 방명록을 지원하지 않습니다.

초대장을 받고싶으신 분들은 댓글 또는 블로그 설명의 메일로.