#Querying your Measurements Timeglass attaches the time you spent as metadata to Git commits. This means you have the full power of Git at your disposal when it comes to querying. This also means that retrieving data will always consists of two steps:
- First, select the work you're interested in by fetching a list of commit hashes (seperated by newlines) from Git using either
git rev-list
orgit log --pretty=%H
. - Second, pipe this list into
glass sum
to add all time entries together. It will output thet total time in a human readable format (e.g 1h59m10s)
Because querying Git can be a science in it own right we included some common patterns below. Have question about your data that isn't answers by any of the examples below? let us know
git log --since="1 days ago" --pretty=%H | glass sum
git log --author=advanderveer --since="9am" --pretty=%H | glass sum
git log --since="may 20" --pretty=%H | glass sum
git rev-list --all | glass sum
git rev-list --author=advanderveer v0.5.0..HEAD | glass sum
git rev-list --all --author=advanderveer | glass sum
git rev-list master..HEAD | glass sum
git rev-list d2192a058^..d2192a058 | glass sum
NOTE: To show all merges that occured: git log --merges --format=oneline