LoginSignup
0
0

More than 1 year has passed since last update.

【GitHub】マージ済みリモートブランチを自動的に削除する方法

Posted at

設定方法

以下の手順でマージされたリモートブランチの自動削除を設定できます。

リポジトリの「Code」の画面から「Settings」をクリックします。
68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f323334323434332f38316634396562612d643965622d353563642d386366302d3630313433383534333935652e706e67のコピー.png

「Settings」画面の「General」をクリックし、下にスクロールします。

スクリーンショット 2022-10-02 22.01.53.png

「Pull Requests」という項目がありその中の「Automatically delete head branches」にチェックを入れます。
68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f323334323434332f38353431333330622d633263612d656666342d393861632d3466366231373733303362342e706e67のコピー.png

コマンドで設定

コマンドで上記の設定をする場合には以下のように実行します。

gh repo edit ユーザー名/リポジトリ名 --delete-branch-on-merge
0
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
0
0