14 test -f $ZIT_FILE || abort "No such file $ZIT_FILE"
15 test $ZIT_FILE = "`basename $ZIT_FILE`" || abort "Sorry, Zit only works on files in the current directory"
16 ZIT_DIR=".zit.$ZIT_FILE"
22 test -e $ZIT_DIR && abort "$ZIT_DIR exists, is $ZIT_FILE tracked already?"
23 mkdir $ZIT_DIR && echo "Initializing Zit repository in $ZIT_DIR"
24 test -d $ZIT_DIR || abort "Failed to create $ZIT_DIR"
26 git init || abort "Failed to initialize Git repository in $ZIT_DIR"
27 ln ../$ZIT_FILE $ZIT_FILE || abort "Failed to link $ZIT_FILE into $ZIT_DIR"
28 git add $ZIT_FILE || abort "Failed to add $ZIT_FILE"
29 git commit "$@" || abort "Failed to make first commit for $ZIT_FILE"