LoginSignup
2
3

More than 5 years have passed since last update.

git rev-parse --abbrev-ref HEADでheadsが付加される

Posted at

git rev-parse --abbrev-ref HEADでheadsが付加される

期待

$ git rev-parse --abbrev-ref HEAD
branch_name

現実

$ git rev-parse --abbrev-ref HEAD
heads/branch_name

why?

branchと同名のtagが存在する場合にこの表記となるようです。
私の場合はtagが不要だったため、tagを消したら期待動作しました

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