Skip to content

Commit ebe22ae

Browse files
committed
Add more help content to README
1 parent f535687 commit ebe22ae

1 file changed

Lines changed: 56 additions & 18 deletions

File tree

README.md

Lines changed: 56 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ GTM is automatic, seamless and lightweight. There is no need to remember to sta
99

1010
Your time metrics are stored locally with the repository as [Git notes](https://git-scm.com/docs/git-notes). If you want to share your data, it can be pushed and fetched to and from the remote repository. Other GTM users on your team can do the same. This provides you the ability to see time metrics for the entire team.
1111

12+
Here are some examples of insights GTM can provide you.
13+
14+
**Git commits with time spent**
15+
1216
```
1317
9361c18 Rename packages
1418
Sun Jun 19 09:56:40 2016 -0500 Michael Schenk 34m 30s
@@ -19,6 +23,9 @@ Sun Jun 19 09:43:47 2016 -0500 Michael Schenk 1h 16m 0s
1923
792ba19 Require a 40 char SHA commit hash
2024
Thu Jun 16 22:28:45 2016 -0500 Michael Schenk 1h 1m 0s
2125
```
26+
27+
**Git commits with detailed time spent by file**
28+
2229
```
2330
b2d16c8 Refactor discovering of paths when recording events
2431
Thu Jun 16 11:08:47 2016 -0500 Michael Schenk
@@ -32,6 +39,9 @@ Thu Jun 16 11:08:47 2016 -0500 Michael Schenk
3239
20s [r] metric/manager.go
3340
49m 0s
3441
```
42+
43+
**Timeline of time spent by day**
44+
3545
```
3646
0123456789012345678901234
3747
Fri Jun 24 * 22m 0s
@@ -41,19 +51,20 @@ Mon Jun 27 * 4m 0s
4151
Tue Jun 28 ** 1h 36m 0s
4252
6h 58m 0s
4353
```
54+
4455
# Getting Started
4556

46-
#### Install the latest GTM release
57+
## Install the latest GTM release
4758

48-
**Mac OS X***
59+
**Mac OS X**
4960

50-
The simplest way to install is to use [Homebrew](http://brew.sh).
61+
The simplest way to install is to use [Homebrew](http://brew.sh) - *Recommended*.
5162
```
5263
brew tap git-time-metric/gtm
5364
brew install gtm
5465
```
5566

56-
**Linux or Mac OS X***
67+
**Linux or Mac OS X**
5768

5869
- Download the pre-build executable from [here](https://github.com/git-time-metric/gtm/releases/latest)
5970
- Extract the tar file to /usr/local/bin, `tar -C /usr/local/bin -zxf <file.tar.gz>`
@@ -62,9 +73,9 @@ brew install gtm
6273
- Stay tuned, we will soon be distributing Linux packages
6374

6475

65-
**Windows***
76+
**Windows**
6677

67-
*Option 1*
78+
*Option 1 - Recommended*
6879

6980
- Download and run the windows installer from [here](https://github.com/git-time-metric/gtm/releases/latest)
7081

@@ -75,30 +86,53 @@ brew install gtm
7586
- Extract the tar file and install the `gtm.exe` in `c:\Program Files (x86)\gtm`
7687
- The release archive is in a tar format, here are some options documented on the Haskell site for [unpacking in Windows](https://wiki.haskell.org/How_to_unpack_a_tar_file_in_Windows)
7788

78-
**Note** - when running GTM in Windows, Mac OS X or Linux, if you recieve an error about something related to [libssh2](https://www.libssh2.org), please create an issue so we can look into it.
79-
80-
#### Install a GTM plug-in for your favorite editor
89+
## Install a GTM plug-in for your favorite editor
8190

82-
Currently we have plug-ins for Atom, Sublime and Vim. More will be added shortly and we are looking for others to contribute plug-ins.
91+
Currently there are plug-ins for Atom, Sublime and Vim. More will be added shortly and we are looking for others to contribute plug-ins.
8392

8493
- [Sublime 3](https://github.com/git-time-metric/gtm-sublime3-plugin)
8594
- [Atom](https://github.com/git-time-metric/gtm-atom-plugin)
8695
- [Vim](https://github.com/git-time-metric/gtm-vim-plugin)
8796

88-
#### Initialize a project for time tracking
97+
## Initialize a project for time tracking
98+
99+
For each project that has a Git repo you need to initialize it with `gtm init` for tracking with GTM otherwise it will be ignored.
100+
```
101+
> cd /Users/mschenk/Projects/go/src/github.com/git-time-metric/gtm
102+
> gtm init
103+
104+
Git Time Metric initialized for /Users/mschenk/Projects/go/src/github.com/git-time-metric/gtm
89105
90-
```sh
91-
cd ~/some-project
92-
gtm init
106+
post-commit: gtm commit --yes
107+
alias.fetchgtm: fetch origin refs/notes/gtm-data:refs/notes/gtm-data
108+
alias.pushgtm: push origin refs/notes/gtm-data
109+
notes.rewriteref: refs/notes/gtm-data
110+
.gitignore: .gtm/
93111
```
94112

95-
#### Edit your files
113+
## Edit some files in your project
96114

97115
Spend some time editing your files. Check your progress with `gtm status`.
98116

99-
#### Commit your work
117+
```
118+
> gtm status
119+
120+
36m 0s [m] README.md
121+
36m 0s
122+
```
123+
124+
## Commit your work
100125

101126
When you are ready, commit your work like you usually do. GTM will automatically save the time spent associated with your commit. To check the time of the last commit type `gtm report`.
127+
```
128+
> gtm report
129+
130+
6620f55 Add more help content to README
131+
Sun Jul 03 16:57:15 2016 -0500 Michael Schenk
132+
133+
40m 0s [m] README.md
134+
40m 0s
135+
```
102136

103137
# Command Line Interface
104138

@@ -134,7 +168,7 @@ status
134168

135169
For general help `gtm --help` and for help on a command `gtm --help <command>`
136170

137-
**Some examples on how to use the CLI**
171+
## Some examples on how to use the CLI
138172

139173
*Report on the last 5 commits*
140174

@@ -160,14 +194,18 @@ gtm report 2401f73324c677f88fd40d2b434f2d007ce0b6f3 93f57ee594c917b2a372e06f09fa
160194
git log --pretty=%H --since="8 days ago" | gtm report
161195
```
162196

163-
**Pushing and fetching notes to and from the remote repository**
197+
The `git log` command provides some nice options for [limiting and filtering output](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History#Limiting-Log-Output). You can use all these options as long as the output format is set to `--pretty=%H`.
198+
199+
200+
## Pushing and fetching notes to and from the remote repository
164201

165202
GTM adds a couple of [git aliases](https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases) to make this easy. It defaults to origin for the remote repository.
166203

167204
```
168205
git fetchgtm
169206
git pushgtm
170207
```
208+
171209
Note - if you don't push your notes to the remote repository you will lose them if you delete and re-clone a repository.
172210

173211
# Known Issues

0 commit comments

Comments
 (0)