0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Git】git fetch されないときに確認したいこと【fetch】

Posted at

git fetchを実行してもリモートブランチの内容がローカルに反映されていないときは、
.git/configfetchの設定が変わっているかもしれません。

fetchの部分が

.git/config
[remote "origin"]
	url = https://github.com/schacon/simplegit-progit
	fetch = refs/heads/develop:refs/remotes/origin/develop

みたいにrefs/heads/developなっていると、リモートのdevelopブランチのみをフェッチします。
デフォルトの設定では

.git/config
[remote "origin"]
	url = git@github.com:your-account/your-repository.git
	fetch = +refs/heads/*:refs/remotes/origin/*

のようになっており、すべてのブランチをフェッチするようになっています。

参考

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?