Repository navigation
Branch Name Argument? #97
Answered
by
alirezanet
mcdonnell-john
asked this question in
Q&A
|
Hi, I just came across this project as I was looking to introduce git hooks into our project, specifically a pre-push hook to verify that a branch name conforms to our standard naming convention. I can see there's args that can be passed into each hook, just wondering if there is a prebuilt arg for branch name, or how I can get it? |
Answered by
alirezanet
Nov 24, 2023
Replies: 1 comment
|
Hi @mcdonnell-john, to get the active branch name you can use the below command: |
0 replies
Answer selected by
alirezanet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @mcdonnell-john,
There is no built-in branch name variable but you can define your custom one.
to get the active branch name you can use the below command: