git config --global init.templatedir '~/.git-templates'
mkdir -p ~/.git-templates/hooks
-
create ~/.tig-brother/checkouts.db (sqlite3) from the dump
-
copy the hook script
-
git init
in the git repo
git config --global init.templatedir '~/.git-templates'
mkdir -p ~/.git-templates/hooks
create ~/.tig-brother/checkouts.db (sqlite3) from the dump
copy the hook script
git init
in the git repo
PRAGMA foreign_keys=OFF; | |
BEGIN TRANSACTION; | |
CREATE TABLE checkouts( | |
checkout_at DATETIME NOT NULL, | |
directory TEXT NOT NULL, | |
branch_name TEXT NOT NULL | |
); | |
COMMIT; |
#!/bin/sh | |
sqlite3 ~/.tig-brother/checkouts.db "insert into checkouts (checkout_at, directory, branch_name) values(datetime('now', 'localtime'), '`pwd`', '`git symbolic-ref -q --short HEAD`')" | |
echo "tig brother is watching you" |