#!/bin/bash # # git-commit-dir.sh - helper app for commiting/importing dir trees to git # Copyright (C) 2008 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. USAGE=' [ ]' SUBDIRECTORY_OK=Yes OPTIONS_SPEC= . "$(git --exec-path)/git-sh-setup" export GIT_INDEX_FILE="$GIT_DIR/commit-dir-index.$$" export GIT_WORK_TREE="$1" shift rm -f "$GIT_INDEX_FILE" trap 'rm -f "$GIT_INDEX_FILE"' 0 git add -v -f . git commit --no-verify "$@" echo "WARNING: Do not forget to run 'git checkout -f' to" echo "update your working copy and index file!"