I\'m writing a small script and want to know how many commits I made on a current branch since it was created.
In this example I\'d have 2 commits made on chil
chil
Assuming you branched from master, master..yourbranch gives you the range of commits that are in yourbranch but not in master.
master..yourbranch
yourbranch
Then you just have to list them one line each, and count the number of lines:
git log master..yourbranch --pretty=oneline | wc -l