Skip to content

feat: backup command #11

@Pertempto

Description

@Pertempto

Add a simple backup command that commits the user's current time-tracker config directory (which includes data.json) and then pushes.

This should error if the config directory isn't set up as a git repository.

We should have simple documentation page for how to set up the config directory as a git repository.

Use this script as an example:

#!/bin/bash
# I run this with helpful `tb` alias:
# alias tb="cd $HOME/.config/time-tracker && ./backup.sh && cd -"

git add .
git commit -m "$(date +%Y-%m-%dT%H:%M:%SZ)"
git push

Create a backup command with b alias.

This could be done in a very similar method to the edit command.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions