14
5

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 5 years have passed since last update.

[Git] shallow cloneしたリポジトリを、あとで完全にfetchする

Posted at

--depth 1 をつけでcloneしたリポジトリを、あとで完全な状態にする方法メモ

TL;DR

fetch --unshallow を使用すればよいとのこと

$ git fetch --unshallow

もし Git が 1.8.3 以前であれば以下でもなんとかなるらしい。(depthの値は十分に深ければなんでもよい)

$ git fetch --depth=1000000

TODO

複数ブランチが存在している場合でも問題ない?

参考

git - Convert shallow clone to full clone - Stack Overflow

14
5
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
14
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?