Return the number of commits in current git branch

You can use this action to get the number of commits of this branch. This is useful if you want to set the build number to the number of commits. See fastlane actions number_of_commits for more details.

Supported platforms ios, android, mac
Author @onevcat, @samuelbeek
Returns The total number of all commits in current git branch

2 Examples

increment_build_number(build_number: number_of_commits)
build_number = number_of_commits(all: true)
increment_build_number(build_number: number_of_commits)


Key Description Default
all Returns number of all commits instead of current branch

* = default value is dependent on the user's system

To show the documentation in your terminal, run

fastlane action number_of_commits

View source code

Back to actions