>. Git 강좌
---- ---------------------------------------------------------------
st1. Git 시작하기
Version Control System - Git
2005년 리누스 토발즈에 의해 개발
2002년 Linux 시스템의 버젼 관리를 위해서 BitKeeper를 사용하려 했으나 실패,
이후 독자적인 버전관리 시스템 개발에 나서게 됨


---- ---------------------------------------------------------------
st2. Git 설치하기
https://git-scm.com/download/win
git bash shell 실행 후 git --version
git config --global user.name "Test Name"
git config --global user.email "testname@gmail.com"
git config --lsit


---- ---------------------------------------------------------------
st3. 저장소 만들기와 커밋(Commit)하기

로칼에서 작업할 "repository" 를 github 접속하여 

"Private" 또는 "Public" 으로 생성 후 clone 으로 생성 한다.


Git Repository(master) 기본명령어 - 1인용
git init                   // 저장소 생성  .git  -- repository
git status                 // 저장소 상태 확인 (파일 추가 전/후 상태확인)
git add <filename>         // 저장소 파일 추가
git commit -m "upload v1"  // 저장소 변경내용 반영
git log

git status
git config -l

 

---- ---------------------------------------------------------------
st4. Branch
git branch (master branch --> wrk1 branch) -> merge
git branch             // * master
git branch wrk1        // branch 생성  (desk, note)
git checkout wrk1      // Switched to branch 'wrk1'
git branch                 // * wkr1
git merge wrk1         // master branch 이동후 merge
git branch -d wrk1     // wrk1 branch 삭제


---- ---------------------------------------------------------------
st5. Merge 와 충돌 해결

git commit 명령어 후 충돌 메시지 내용
  1. merge CONFLICT ~~~~ 메시지 확인

  2. both modified:    file name  ~~~ 메시지 확인
  3. 해당 file 편집 상태에서 충돌난 내용 삭제/편집 후 저장

  4. git add, commit 재작업 또는 반복작업 

gitk


---- ---------------------------------------------------------------
st6. 원격 저장소 생성 (Github)
원격 저장소 생성 (github)
local 경로 이동
git clone https://github.com/test/download.git

 

git add, commit 재작업 또는 반복작업

 

git push               // 파일 upload
github 사이트 이동 후 내용확인

 

---- ---------------------------------------------------------------
st7. 원격 저장소와 PR(Pull Request)
원격 저장소와 Pull Request
git clone : Remote repository 내용을 복제
git push  : Remote repository 내용을 업로드
git pull  : Remote repository 내용을 다운로드
git fetch : Remote repository 변동 내용만 다운로드

 

git feetch origin/master          // 파일 변경사항 확인만

git pull origin master              // 파일 download (merge + pull)

 

다른 git사이트에서 "Fork" 생성후 

나의 git사이트에 선택한 repository 복사 확인

 

DOS창에서 git clone [나의 git 사이트 복사된 repository]
ex) git clone https://github.com/testname/aaa.git

 

git add, commit 재작업 또는 반복작업

 

git push               // 파일 upload
github 사이트 이동 후 내용확인

 

#. git Hub(work) -> git Hub(master) 요청 작업
"New pull request" 생성 버튼 클릭
"Create pull request" 창 이동 후 설명 추가 하고 "Create pull request" 버튼클릭

 

#.  git Hub(master) 검토 확인 작업

상단 탭에 상태건수(1) 요청 확인 건 클릭 후 내용 확인 하고 취소 또는

"Merge pull request" 버튼클릭 "Confirm merge" 버튼클릭

--> git Hub(work) 사이트에 잘 병합되었다 메시지 전달(Pull request closed)

 

---- ---------------------------------------------------------------

etc. Git 소스 처리 흐름도

---- ---------------------------------------------------------------

#. 원격 저장소 Repository 작업

 

 

 

 

#. Version Control System

 

 

#. 원격 저장소 Pull Request 작업

 

Git 강좌 - 01.Git 시작하기
https://www.youtube.com/watch?v=JZJQ4_8XoPM&t=18s

Git 강좌 - 02.Git 설치하기
https://www.youtube.com/watch?v=dBuyUHKvmEk&t=12s  

Git 강좌 - 03.저장소 만들기와 커밋(Commit)하기
https://www.youtube.com/watch?v=W0aofTKVwJs&t=13s  

Git 강좌 - 04.Branch
https://www.youtube.com/watch?v=iiAlXe8H5y8&t=8s  

Git 강좌 - 05.Merge 와 충돌 해결
https://www.youtube.com/watch?v=vGRISKOIS-w&t=9s  

Git 강좌 - 06.원격 저장소 생성 (Github)
https://www.youtube.com/watch?v=tQa7DoaFaxM&t=24s  

Git 강좌 - 07.원격 저장소와 PR(Pull Request)
https://www.youtube.com/watch?v=xIydJ53nnqY&t=22s  

+ Recent posts