379 B
379 B
title, type, tags, cover, dateModified
| title | type | tags | cover | dateModified | |
|---|---|---|---|---|---|
| Get the current branch name | snippet |
|
cherry-trees | 2021-04-13T21:10:59+03:00 |
Prints the current branch name.
- Use
git rev-parse --abbrev-ref HEADto print the name of the current branch.
git rev-parse --abbrev-ref HEAD
git checkout patch-1
git rev-parse --abbrev-ref HEAD # Prints `patch-1`