본문 바로가기

Software/Git

nothing to fetch (이클립스 git)

Pulling 1 repository

See 'Details' for more information.

 

Nothing to fetch.

 

 

무슨 사유인지 정확히 모르겠지만 가끔 이클립스에서 remote가 사라지는 경우가 있어요.

오류 그대로 fetch가 없다는 뜻이에요.

이런 경우 수동으로 잡아줘야해요.

 

Git Repository - Properties 클릭

 

remote에 fetch를 추가해주어야 해요.

open을 클릭하면 IDE에서 .git\config 파일이 열려요.

 

.git\config

[remote "origin"] 란에 fetch 추가 후에 저장

fetch = +refs/heads/*:refs/remotes/origin/*

혹은

fetch = +refs/heads/*:refs/remotes/{리포지토리명}/*

 

[core]
	symlinks = false
	repositoryformatversion = 0
	filemode = false
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/talkplaylove/spring-demo.git
	fetch = +refs/heads/*:refs/remotes/spring-demo/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
	rebase = false