0
0

More than 1 year has passed since last update.

Gitコマンド 削除編

Last updated at Posted at 2022-12-13

ブランチ確認

$ git branch -a

-a オプションで、リモートブランチを含んだブランチの一覧も表示してくれるので
個人的には基本つけてます!

ローカルブラン削除

$ git branch -d 【削除したいブランチ名】

マージしてないとかなんたらで、なんかうまく消えない時
消しても問題ない場合は小文字ではなく-D オプションをつける

$ git branch -D 【削除したいブランチ名】

消すのしばらく忘れてて、一気に消したいとき

$ git branch | grep 【検索条件】 | xargs git branch -d

一回grepまでを実行して確認したほうが良いです!
xargs(エックスアーグズ)grep結果を引数にして削除!

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