To fix this problem in Eclipse, open theWindowsmenu and selectShow View/Other/Git Repositories.
From the Git Repositories tab:
- expand your local repository (注 :这个就是在那个tab里的根目录)
- right click onRemote
- click onCreate Remote...
- Remote name = origin
- next toIRIpress theChangebutton
- CTRL+SPACEon URI
- select the remote location
- pressFinish
- pressSave and Push
Again, from the Git Repositories tab:
- right click onorigin
- selectConfigure Fetch...
- on Ref mapping press theEdit (Advanced)...
- pressAdd All Branches Spec
- select theForce Updatecheckbox
- pressFinish
Again, from the Git Repositories tab:
- right click on your local repository
- selectProperties
- pressNew Entry...
- enter the following two keys:
(1)
Key = branch.master.remote
Value = origin
(2)
Key = branch.master.merge
Value = refs/heads/master