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

PR作成後のお作法

Last updated at Posted at 2025-08-11

手段が3つある。

A. PR「承認済みかつ、マージ済み」

git switch main
git pull --ff-only
git fetch -p
git branch --merged              # 消してOK候補を確認
git branch -vv                   # 追跡や ahead/behind も確認
git branch -d <対応してたブランチ>   # 候補なら削除
# squash等で -d が拒否 → 内容がmain入り済みを確認のうえ
git branch -D <対応してたブランチ>   # どうしても残す理由がなければ強制削除
git push origin --delete <対応してたブランチ>   # リモートも片付け

B. PR「承認済みだが、まだマージしてない」

Mainに取り込まれていない。

git switch main
git pull --ff-only
git fetch -p         # 任意
# もう不要なら
git branch -vv
git branch -d <対応してたブランチ>

C. PR「未承認のまま、ローカルで main に取り込みたい」(運用次第でやる場合)

そこまで無理してやる必要ない

git switch main
git pull --ff-only 
git merge --no-ff <対応してたブランチ>
git push
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?