1
0

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 1 year has passed since last update.

【Git】fetch時に常にpruneするようにする方法

Posted at

git pull --prune, git fetch --prune

git pull --prunegit fetch --pruneを実行すると削除済みのリモートブランチの追跡ブランチを削除できます。

git pull --prune
git fetch --prune

常に--pruneする

git pullgit fetchの際に常にpruneするには以下のコマンドを実行してGitの設定を追加します。

git config --global fetch.prune true

現在のリポジトリのみに設定するには以下のコマンドを実行します。

git config --local fetch.prune true
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?