Skip to content

Instantly share code, notes, and snippets.

Created Jan 27, 2016
What would you like to do?
LIST=`find . -type d -name ".git" -prune -or -type f -print`
# lsコマンドのオプションはFreeBSD 10.1のlsコマンドを想定しているので注意
for f in ${LIST}; do
FDATE=`LANG=C ls -l -D "%a, %d %b %Y %T %z" "$f" | cut -d " " -f 9-14`
FNAME=`basename "$f"`
echo "[$FDATE] [$FNAME] [$f]"
git add "$f"
git commit --date="$FDATE" --message "Add ${FNAME}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment