1. 程式人生 > >eclipse中git push需要輸入地址

eclipse中git push需要輸入地址

在eclipse中使用git的時候,前一次push完之後,再push一次時,總會又出現讓你重新填寫push地址。

解決辦法:
eclipse –> Window –> Team –> configuration,Respository Settings 最上面有個Respository,找到你現在的專案,點選右邊的open,會開啟git的配置。

git配置檔案中進行如下配置:

[core]
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
[remote "origin"]
    url =https://github.com/XXX(使用者名稱)/XXX(專案名)
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master