GIT 쓸 일이 없다 보니..
일단 리눅스에서 개발하면서 한번 써보면 파악이 되겠지 머..
$ apt-cache search git | grep ^git git - fast, scalable, distributed revision control system git-core - fast, scalable, distributed revision control system (obsolete) git-all - fast, scalable, distributed revision control system (all subpackages) |
step 1. 패키지 설치(안되어 있다면)
$ sudo apt-get install git |
step 2. git 설정
$ git config --global user.name "이름" $ git config --global user.email "이메일주소" $ git config --global color.ui "auto" |
step 3. 설정 내용 확인
$ git config --list user.name=이름 user.email=이메일주소 color.ui=auto $ vi ~/.gitconfig [user] name = 이름 email = 이메일주소 [color] ui = auto |
step 4. 저장소 생성
$ mkdir git_repo $ cd git_repo ~/src/git_repo$ git init 초기화: 빈 깃 저장소, 위치 /home/odroid/src/git_repo/.git/ $ ll 합계 12 drwxrwxr-x 3 odroid odroid 4096 4월 24 15:56 ./ drwxrwxr-x 5 odroid odroid 4096 4월 24 16:08 ../ drwxrwxr-x 7 odroid odroid 4096 4월 24 15:56 .git/ $ du -h 8.0K ./.git/info 44K ./.git/hooks 4.0K ./.git/objects/info 4.0K ./.git/objects/pack 12K ./.git/objects 4.0K ./.git/branches 4.0K ./.git/refs/heads 4.0K ./.git/refs/tags 12K ./.git/refs 96K ./.git 100K . |
step 5. 저장소 복제
$ mkdir test $ cd test $ git clone ~/src/git_repo/ 'git_repo'에 복제합니다... warning: 빈 저장소를 복제한 것처럼 보입니다. 완료. |
[링크 : http://devaom.com/?p=745]
[링크 : https://git-scm.com/book/ko/v2/Git-서버-프로토콜]
+
bare를 주면 .git 아래 생성될게 바로 생성되는건가?
$ git init --bare --shared 초기화: 빈 공유 깃 저장소, 위치 /home/odroid/src/tt/
$ ll 합계 40 drwxrwsr-x 7 odroid odroid 4096 4월 24 16:08 ./ drwxrwxr-x 5 odroid odroid 4096 4월 24 16:08 ../ -rw-rw-r-- 1 odroid odroid 23 4월 24 16:08 HEAD drwxrwsr-x 2 odroid odroid 4096 4월 24 16:08 branches/ -rw-rw-r-- 1 odroid odroid 126 4월 24 16:08 config -rw-rw-r-- 1 odroid odroid 73 4월 24 16:08 description drwxrwsr-x 2 odroid odroid 4096 4월 24 16:08 hooks/ drwxrwsr-x 2 odroid odroid 4096 4월 24 16:08 info/ drwxrwsr-x 4 odroid odroid 4096 4월 24 16:08 objects/ drwxrwsr-x 4 odroid odroid 4096 4월 24 16:08 refs/
$ du -h 8.0K ./info 44K ./hooks 4.0K ./objects/info 4.0K ./objects/pack 12K ./objects 4.0K ./branches 4.0K ./refs/heads 4.0K ./refs/tags 12K ./refs 96K . |
[링크 : https://git-scm.com/book/ko/v2/Git-서버-서버에-Git-설치하기]
+
shared가 정의되지 않으면 umask에 의해 나오는 결과로 생성하는 것으로 보인다.
근데.. shared만 설정하면 머가 되는진 모르겠네?
- --shared[=(false|true|umask|group|all|world|everybody|0xxx)]
Specify that the Git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository. When specified, the config variable "core.sharedRepository" is set so that files and directories under $GIT_DIR are created with the requested permissions. When not specified, Git will use permissions reported by umask(2). The option can have the following values, defaulting to group if no value is given:
- umask (or false)
Use permissions reported by umask(2). The default, when --shared is not specified. - group (or true)
Make the repository group-writable, (and g+sx, since the git group may be not the primary group of all users). This is used to loosen the permissions of an otherwise safe umask(2) value. Note that the umask still applies to the other permission bits (e.g. if umask is 0022, using group will not remove read privileges from other (non-group) users). See 0xxx for how to exactly specify the repository permissions. - all (or world or everybody)
Same as group, but make the repository readable by all users. - 0xxx
0xxx is an octal number and each file will have mode 0xxx. 0xxx will override users' umask(2) value (and not only loosen permissions as group and all does). 0640 will create a repository which is group-readable, but not group-writable or accessible to others. 0660 will create a repo that is readable and writable to the current user and group, but inaccessible to others.
By default, the configuration flag receive.denyNonFastForwards is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it. If you provide a directory, the command is run inside it. If this directory does not exist, it will be created. |
[링크 : https://git-scm.com/docs/git-init#git-init---sharedfalsetrueumaskgroupallworldeverybody0xxx]
위에 기록을 보니..
SGID를 통해서 접근 통제를 하도록(그룹권한을 따름) rws로 설정된다.
+
git 혼자사용으로 검색
[링크 : http://www.internetmap.kr/entry/Simple-Guide-for-Git]
+
2018.04.26
git 콘솔 명령어 목록 모음
[링크 : https://github.com/jeonghwan-kim/git-usage]