Why download requests occur when retrieving

Every time I get fetch from the GitHub repo, a bunch of pull requests are extracted from the console:

 /c/git/myProject>git fetch From github.com:MyOrganization/myProject * [new ref] refs/pull/1/head -> origin/pr/1 * [new ref] refs/pull/10/head -> origin/pr/10 * [new ref] refs/pull/11/head -> origin/pr/11 * [new ref] refs/pull/12/head -> origin/pr/12 ... 

To get rid of them, I use git remote prune origin or git fetch --prune , but return requests are returned when I git fetch again. I found several links on the Internet that allow you to receive download requests locally (add fetch = +refs/pull/*/head:refs/remotes/origin/pr/* in .git/config ), but I did not.

My colleague does not see this problem, and his ~/.gitconfig and .git/config are similar to mine. It uses git under cygwin, and I use git - bash, which comes with GitHub for Windows (not the GUI), version 1.0.47.0.

Any ideas why this is happening and how to stop it?

+4
source share
1 answer

GitHub for Windows "Git Portable" (MsysGit portable installation) installs refcpec fetch globally to enable pull requests; you can see this by running git config --list in git - bash.

You can undo this by deleting the corresponding fetchspec, for example:

 git config --system --unset remote.origin.fetch 
+3
source

Source: https://habr.com/ru/post/1486281/


All Articles