1

A tool I am using requires an entry in my ~/.gitconfig:

[remote "foo"]
        token = 1894701a

However, this means that from any git repository, git thinks that I have an extra remote called "foo". So if I run

git fetch --all

It complains

fatal: 'foo' does not appear to be a git repository
fatal: Could not read from remote repository.

Is there a way to tell git to only fetch the remotes which are actually specified by my local git repository? Or to not try to fetch remotes without a remote URL?

1 Answer 1

2

Enabling the skipFetchAll option should do the trick:

[remote "foo"]
        token = 1894701a
        skipFetchAll = true

The git-config manual page has a complete list of configuration options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.