1. 程式人生 > >【git】知識積累

【git】知識積累

1、git的pull報錯The current branch is not configured for pull No value for key branch.master.merge found in configuration

git的commit可以正常執行,但是pull報錯。
解決方案:在專案的.git目錄下的config檔案
原來:

[core]
	repositoryformatversion = 0
	filemode = false
	logallrefupdates = true
[remote "origin"]
	url = http://***.**.**.**/lwd/gdglxt.git			//git的存放的ip地址
	fetch = +refs/heads/*:refs/remotes/origin/*

新增:

[core]
	repositoryformatversion = 0
	filemode = false
	logallrefupdates = true
[branch "master"] 
        remote = origin 
        merge = refs/heads/master
[remote "origin"]
	url = http://***.**.**.**/lwd/gdglxt.git     		//git的存放的ip地址
	fetch = +refs/heads/*:refs/remotes/origin/*

可以開啟原來正常執行的專案的git下的config檔案對比一下。