LoginSignup
6
4

More than 5 years have passed since last update.

Gitを2.21.0にアップデートしたらcloneできなくなった話(fatal: multiple updates for ref 'refs/remotes/origin/master' not allowed)

Last updated at Posted at 2019-03-01

現象

Mac用パッケージ管理ツールのHomebrew経由でGitを2.21.0(2月24日リリース)にアップデート。
GitHubからソースを落としてくるべく、git cloneを実行したら次のエラーが発生。

fatal: multiple updates for ref 'refs/remotes/origin/master' not allowed

Gitの管理下ではないディレクトリでcloneしても発生するからよくわからない。

解決方法

Gitのglobal設定が保持されている~/.gitconfigから[remote "origin"]に関する記述を削除したら解消。

##### 変更前 ######

[user]
    email = *****
    name = *****
[http]
    postBuffer = 2M
[core]
    excludesfile = /Users/xxxxx/.gitignore_global
    editor = vim
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
##### 変更後 ######

[user]
    email = *****
    name = *****
[http]
    postBuffer = 2M
[core]
    excludesfile = /Users/xxxxx/.gitignore_global
    editor = vim

最後に

[remote "origin"]の設定が2.21.0のバージョンアップの際に追加されたのか、それとも旧来からある設定がこのバージョンアップで悪さをするようになったのかは不明。
とりあえずは問題なく動いているので良かったがモヤモヤする……

備考

2019/03/01:諸事情により再投稿しました

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4