1

Git を古いバージョンからアップグレードしたところ、リモート リポジトリからプルするたびに次の警告メッセージが表示されます。

$ git pull
warning: Config remote shorthand cannot begin with '/': /mnt/titanium/repos.url
warning: Config remote shorthand cannot begin with '/': /mnt/titanium/repos.fetch

このリモート リポジトリは USB スティック上のディレクトリであり、ネットワークに直接接続せずにファイルをコンピュータに転送するために使用します。USB スティックは /mnt/titanium にマウントされます

$ git remote -v
warning: Config remote shorthand cannot begin with '/': /mnt/titanium/repos.url
warning: Config remote shorthand cannot begin with '/': /mnt/titanium/repos.fetch
origin  /mnt/titanium/repos (fetch)
origin  /mnt/titanium/repos (push)

私の .git/config は次のようになります。

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[branch "master"]
[remote "/mnt/titanium/repos"]
        url = origin
        fetch = refs/heads/*:refs/remotes//mnt/titanium/repos/*
[remote "origin"]
        url = /mnt/titanium/repos
        fetch = refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

この変更の理由について読みましたが、この警告を消すにはどうすればよいかわかりません。

4

1 に答える 1