Git: Difference between revisions

Jump to navigation Jump to search
334 bytes added ,  28 September 2016
add Get a build number
→‎Commands: add git maint commands
add Get a build number
Line 4: Line 4:


<source lang="bash">
<source lang="bash">
git config --global user.signingkey 0A46826A
$ git config --global user.signingkey 0A46826A
</source>
</source>


= Commands =
= Commands =
== Get a build number ==
A commit count can be used as a build number for a revision (e.g. HEAD, master, a commit hash):
<syntaxhighlight lang="bash">
$ git rev-list --count <revision>
</syntaxhighlight>
To get the commit count across all branches:
<syntaxhighlight lang="bash">
$ git rev-list --all --count
</syntaxhighlight>


== Add a local branch that tracks a remote branch ==
== Add a local branch that tracks a remote branch ==

Navigation menu