【Git】branchの削除

  • このエントリーをはてなブックマークに追加

github上のbranchの削除した後に、gitのbranchを削除しようとしたら次のようにエラーが出た。
gitのbranchを削除した後に、github上のbranchの削除する必要がある。
削除する順番は重要だな。まぁ、-Dオプションで強制的にbranchの削除できるけどな。

追記 20231005
違うか。これは、mainでpullしていない状態でbranch削除しようとしてもエラーが出るな。
branch削除でエラーが出るパターンは複数あるみたいだな。


〇〇〇@B-7-PC MINGW64 ~/webrtc-sample1 (main)
$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

〇〇〇@B-7-PC MINGW64 ~/webrtc-sample1 (main)
$ git branch -d update20230728
error: The branch 'update20230728' is not fully merged.
If you are sure you want to delete it, run 'git branch -D update20230728'.

〇〇〇@B-7-PC MINGW64 ~/webrtc-sample1 (main)
$ git branch -D update20230728
Deleted branch update20230728 (was 1e5d885).

  • このエントリーをはてなブックマークに追加

SNSでもご購読できます。

コメントを残す

*