I am trying to get branch name of the last commit pushed to git that triggered my post-commit groovy script, anybody has an idea that how can I do this??
how to get latest commit ref on giblit post commit hook
321 views Asked by Marcos Costa Pinto At
        	1
        	
        
	
                        
There are many examples of how to get that info. Try this one: https://github.com/gitblit/gitblit/blob/master/src/main/distrib/data/groovy/blockpush.groovy
The important thing to remember is that git can push multiple refs (branches & tags) simultaneously so it's easy to receive more than one.