gittt-cli
This project aims to track the time spent on a specific git project and stores it locally and separate git repository.
Features
- Use a own git repository as a time tracking server
- Add time records to the past
- Edit committed time records
- Git-like syntax
- Timer
- Publish recorded amount of spent time to third party applications (e.g. Jira)
.gittt.yml
Using the - Create a directory in your workspace which represents the project
mkdir new_project
- Navigate into the project directory
cd new_project
- Create a
.gittt.yml
file in a new directory or an existing project directory with the following content
name: new_project
- Initialize the new gittt project
gittt init
.git/config
to .gittt.yml
Migrate projects from - Create a
.gittt.yml
file in a new directory or an existing project directory with the following content
name: name_of_the_project_to_book_resources_to
- Navigate to the projects directory in your gittt config directory in your home directory
cd ~/.gittt-cli/projects
- Move the projects file from the project to migrate into the root projects directory
mv github_com/project_to_migrate.json .
- Open up the json file and remove the meta data object and fix the name
2,6d1
< "meta": {
< "host": "github.com",
< "port": null,
< "raw": "git@github.com:eiabea/tempea-api.git"
< },
> "name": "name_of_the_project_to_book_resources_to",
- Save the file and you are good to go
Bash completion
cp bash/gittt-completion.bash /etc/bash_completion.d/gittt-completion.bash
source /etc/bash_completion.d/gittt-completion.bash
How to
- Install binary on your system (tba.)
- Create an empty private git repository on your favorite git provider (e.g. github or GitLab) or on your private git server
- Initialize the gittt working directory by executing
$ gittt init
- Change into a local git repository of any awesome project you are currently working on
$ cd my-awesome-project
- Commit the spent hours with the following command
$ gittt commit -m "Spent a great time with this code" -a 3
- After committing more hours or editing already committed hours the data can be pushed to your time tracking repository by executing
$ gittt push
CSV Import to projects
Use the CSV importer option to import a csv file to your project.
The CSV file has to include a header with at least the columns MESSAGE,END,AMOUNT,TYPE
(any other columns will be ignored)
Hint: The TYPE
row is mandatory and currently only takes Time
as a valid input.
MESSAGE,END,AMOUNT,TYPE
Added Production Build,1570298400000,0.5,Time
The END
parameter can also be formated in the human readable form Y-m-d HH:mm:ss
e.g.
MESSAGE,END,AMOUNT,TYPE
Added Production Build,2019-10-05 18:00:00,0.5,Time
Import data to your current project (aka. The git directory you are currently at) with
$ gittt import [path_to_your_file].csv
Releases
The binary releases can be found under the Releases Tab
Contribute
Every help is appreciated, take a look at the Contributing file