git
-
[Windows10] github ssh key생성 및 등록ETC 2020. 12. 30. 18:17
0. 설치 - www.putty.org/ 에서 putty를 다운로드 받는다. (puttygen.exe, pageant.exe가 이미 설치 되어있는경우 통과) - 설치 경험이 아예 없는경우는 c:\Program Files\Putty 에 압축파일을 풀고 어디에서나 실행할 수 있도록 환경변수 path 에 등록해주자 1. 윈도우10에서 ssh key 생성 ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - c:\users\(id)\.ssh 에 key 가 생성된다. 2. private key를 ppk 형식으로 변경 puttygen.exe 실행 - c:\users\(id)\.ssh\id_rsa 파일 선택 id_rsa.ppk 파일 생성 3. pageant.exe 실행 ..
-
git submodule 파일 받아지지 않을때Programming 2020. 3. 30. 14:40
서브 모듈이 root project에 등록된 상태인데 git pull 을 해도 별다른 에러 없이 받아지지 않을때가 있다. 다음 명령들은 Project top level path 에서 실행한다. 1. 원격 저장소를 기준으로 업데이트 $ git submodule update --remote --recursive 2. (Project top level path 에서) .git/config 파일을 확인 $ vi ./.gitmodules : [submodule "submodules/a"] path = submodules/a url = git@github.com:id/a.git submodule 항목에 정의가 되어있는지 확인한다. 3. (Project top level path 에서) .gitmodules 파일을 ..
-
git 브랜치 관리카테고리 없음 2018. 1. 18. 14:04
1. 로컬 및 원격 브랜치 삭제 #1. remove the branch from remote reposotirygit push origin --delete #2. remove local branchgit branch -D 2. 로컬 및 원격 브랜치명 변경 #1. rename local branchgit branch -m old_branch new_branch #2. apply to the repositorygit push origin :old_branch 3. 다른브랜치의 특정 Commit 사항만 가져와서 적용하기 git cherry-pick (commit-id) commit id ex > 5f7c23f5c82c82a10541c6da037db99d018389ee 4. 원격 브랜치 내려받기git check..
-
git 일부 디렉토리만 clone 받기 (sparse checkout)ETC 2016. 10. 14. 20:18
svn의 경우 checkout 시에 세부 디렉토리를 바로 지정 가능하기 때문에 이 작업이 쉬우나 git의 경우 몇가지 작업이 필요하다.(영어로는 sparse checkout이라 한다.) 1. (특정 디렉토리만 받게될) 디렉토리 초기화mkdir cd git initgit remote add -f origin 위 명령을 차례대로 실행하면 빈 디렉토리를 생성하고 모든 오브젝트를 가져오지만 실제로 모든 파일을 checkout 하지는 않는다. 2. 설정 변경git config core.sparseCheckout true부분 체크아웃 설정을 true로 설정해준다. 3. 디렉토리 추가echo "some/dir/" >> .git/info/sparse-checkout체크아웃 받을 세부 디렉토리를 설정에 추가한다.(이 ..