LoginSignup
3
1

More than 5 years have passed since last update.

gitで現在のブランチ名だけを取り出す

Posted at

current ref には * がついてしまうので format を指定する。

git branch --contains=HEAD --format='%(refname:short)'

参考: https://qiita.com/usamik26/items/8aa6c3aed4b9c7dba5ca

3
1
1

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
3
1