본문 바로가기

카테고리 없음

git test2 이클립스 깃 연동 Repository 폴더를 따로 만든 경우

728x90

Project name: javaproject1

D:\workspace/javaproject1

D:\repositories\javaproject1





Project Explorer 에서 프로젝트 이름 > 오른쪽 클릭 > Team > Share Project

Configure Git Repository

Create




미리 만들어논 폴더 지정

D:\repositories\javaproject1



2. Repository: D:\repositories\javaproject1\.git




Git Perspective : Git Repositories



Remote 저장소와 연결하기

Remotes > 마우스 우클릭 > Create Remote

Remote name: origin

OK


Configure Push

https://github.com/purplike/1.git 를 복사한채로 [Change...]



Select a URI

클립보드에 가지고 있는게 자동 입력되어있음신기

Finish



Configure Push [Save]

Save and Push: 현재 파일을 Remote에 올린다.

Save: 서버에 올리지 않고 Remote 정보만 저장한다. 



Configure Push [Save and Push] 를 누르면 

아직 로컬 저장소에 Commit하지 않았으므로 [문제발생]




Can't connect to any repository: https://github.com/purplike/1.git (An internal Exception occurred during push: Source ref refs/heads/master doesn't resolve to any object.)



5. Push - 로컬 저장소에서 Remote로 옮기기

 5-1. Git Perspective: 프로젝트이름 우클릭 Push Branch 'master'


rejected - non-fast-forward



728x90