일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- 인증
- kmip
- SSH
- fido
- Nodejs
- SWIFT
- MSYS2
- MYSQL
- SwiftUI
- 앱스토어
- apple
- 앱리소스
- OTP
- WebAuthn
- Xcode
- 애플
- MFA
- FIDO2
- 앨범북
- albumbook
- git
- SSL
- 2FA
- appres
- 안드로이드
- openssl
- css
- OSX
- Android
- otpkey
- Today
- Total
인디노트
Git 에 심볼릭 링크파일 사용하는 방법 본문
$ ln -s /Path/referenced/by/symlink symlink
Git doesn't know about this file yet. git ls-files
lets you inspect your index (-s
prints stat
-like output):
$ git ls-files -s ./symlink
[Nothing!]
Now, add the contents of the symbolic link to the Git object store by adding it to the index. When you add a file to the index, Git stores its contents in the Git object store.
$ git add ./symlink
So, what was added?
$ git ls-files -s ./symlink
120000 1596f9db1b9610f238b78dd168ae33faa2dec15c 0 symlink
The hash is a reference to the packed object that was created in the Git object store. You can examine this object if you look in .git/objects/15/96f9db1b9610f238b78dd168ae33faa2dec15c
.
The 120000
is the file mode. It would be something like 100644
for a regular file and is the mode special for links. From man git-config
:
core.symlinks
If false, symbolic links are checked out as small plain files that contain the link text. git-update-index(1) and git-add(1) will not change the recorded type to regular file.
Use git cat-file -p
to pretty-print the contents:
$ git cat-file -p 1596f9db1
/Path/referenced/by/symlink
So, that's what Git does to a symbolic link: when you git checkout
the symbolic link, you either get a text file with a reference to a full filesystem path, or a symlink, depending on configuration. The data referenced by the symlink is not stored in the repository.
'개발 플랫폼 및 언어' 카테고리의 다른 글
MySQL 5.7.9 릴리즈 변화된 root 비밀번호 변경하기 (0) | 2017.05.05 |
---|---|
How to Install MySQL on CentOS 6 (0) | 2017.05.05 |
[안드로이드 스튜디오]라이브러리 프로젝트(모듈) 링크로 가져오는 방법 출처: http://gun0912.tistory.com/15 [박상권의 삽질블로그] (0) | 2017.03.17 |
톰캣 7에서 SSL(HTTPS) 설정하기 (0) | 2017.03.17 |
Tomcat & Apache & Websocket 사용 시 방화벽에 의한 프록시 설정 (0) | 2017.03.14 |