✍개발 협업의 필수요소인 git(Eclipse)의 설정과 사용법을 배웠다.
곧 시작될 세미 프로젝트때 git사용을 제대로 못하면 역적이된다...
나를 위해서가 아닌 타인을 위해서도 꼭 알자
Winddow -> Show View -> other -> git(Repositories, Staging), history
Preferences -> General -> Workspace -> other(UTF-8)
-> General -> Editors -> Text Editors -> Spelling -> Encoding(Default UTF-8)
-> Web -> CSS Files -> Encoding{ISO Unicode(UTF-8)}
-> HTML Files -> Encoding{ISO Unicode(UTF-8)}
-> JSP Files -> Encoding{ISO Unicode(UTF-8)}
-> Java -> installed JREs -> 기존 JRE Remove -> add -> Standard VM -> 생성된 java 폴더(java-11)
-> Java -> Compiler(level 11)
생성된 파일 Team -> Share Project -> .git 생성
프로젝트 이름 = local repository , master = branch
.gitignore = git의 변경사항을 감지한다.
gitignore.io 사이트를 이용 gitignore의 세팅을 좀 더 쉽게한다.
https://www.toptal.com/developers/gitignore
생성된 코드를 .gitignore에 복사
GitStaging에서 버전만들기 git name, email 확인
CLI = watch dirty-> git add . -> stagung area -> git commit -m "message" -> version
GUI = 위 과정이 이미지의 1,2,3번이다
아래에서 위로 작업 순서
Reset은 순서에 상관없이 Reset의 시점으로 돌아간다. Mixed = Unstaged Changes에 기록이 남는다 Hard = 기록이 없어지고 Reset시점으로 되돌아간다.
merge의 종류
1. fast-forward merge
Never conflict! 절대 충돌나지 않는다
master를 온전히 포함 했다면? fast-forward merge
2. non-fast-forward merge
conflict! 의 위험성이 있다.
github access token 설정 방법 = github settings -> Developer settings
-> Personal access tokens -> Generate new token -> Note 설정 후 유효기간 설정
remote repo 설정하기(Ref Mappings) -> Advanced -> All Branches -> save
Configure Fetch 실행 -> 3번과 동일한 과정
Push 진행 (원격저장소로 local repository의 정보를 전송함)
6.mster.Snake 원격저장소 push (local repository commit -> Push 과정 진행