如果已经在eclipse中clone了git的项目,这时当git中又新建了项目,eclipse无法切换到这新建的项目,解决办法:
in the git repositories view:
- right-click the repository and choose fetch from upstream
- if the new branch will not shown up below branches/remote tracking, you have to configure fetch:
- right-click the fetch node below remotes/origin and choose configure fetch...
- in the configure fetch make sure there is only the single ref mapping (assuming the remote is named
origin
) refs/heads/*:refs/remotes/origin/*
:
这时再次fetch from upstream,则新建的项目再次重现:git repositories view-->branches-->remote checking中。
双击新的分支,选:check out as new local branch即可。