So I have a build shell script that calculates a build number for a mobile application based on the count of commits to the HEAD branch (BUILD_NUMBER=git rev-list HEAD --count
)
Is there a way of getting the total number of commits across two branches? Either in a single git command or in multiple lines in the script? Not well versed in either git or zsh :(
To be clear, what I am seeking is a way to get the SUM of commits in two branches (count of commits in branch1 + count of commits in branch2) Can this be done in a single command? Is there a way to do it in multiple steps within the build shell script?