From: Jeff King Date: Thu, 16 Jun 2016 12:13:54 GMT Subject: Re: URL rewrite in local config unable to override global config rule Message-ID: <20160616121353.GB15988@sigill.intra.peff.net> In-Reply-To: On Thu, Jun 16, 2016 at 03:44:17PM +0530, Saksham Saxena wrote: > Summary : Added a new rule to the local config of a git repo by > issuing ' git config --local url."https://".insteadOf git:// ', but it > wasn't observed by git as it kept using "git://". Hmm. This works in a simple example for me... > Details : I had set my global config to use "git://" instead of > "https://", as I prefer working with SSH. ..even if I have an existing "url.git://.insteadOf=https://". But I could believe that having other config confuses things. The url-rewriting is not "last one wins", but rather that we try all of them, and the longest match wins. Can you show us the output of "git config --list" on a repository that is having this problem, and then the command that you run and its output? > Recently, I began writing a > 'GitHub Wiki' of one of my GitHub projects, and, apparently, those > Wikis are normal git repositories, and can be cloned and edited > locally. However, the clone url available is served over HTTPS only, > and doesn't support any other protocol. You should be able to clone, fetch, or push wiki repositories using any of the normal protocols. So: git@github.com:username/repo.wiki.git should work. Likewise, git:// will work if the repository is public, but you cannot push over it. -Peff