I want to push all changes on a drools git repo to a GitHub repository, I managed to get it working only for the master branch.
I'm trying to get the branch being saved in order to push to the same branch remotely, I'm currently doing:
BRANCH=$(git --git-dir=. --work-tree=. branch --show-current)
this always returns master regardless of which branch was modified
I've also tried:
git log -1 HEAD
but only shows master commits
Is there a way to get the branch being change from a bash?
Thanks in advance
After research you can get latest changed branch with