Skip to content

Instantly share code, notes, and snippets.

@LadyNamedLaura
Created February 18, 2016 10:57
Show Gist options
  • Save LadyNamedLaura/fd634b9ee5699942d3d0 to your computer and use it in GitHub Desktop.
Save LadyNamedLaura/fd634b9ee5699942d3d0 to your computer and use it in GitHub Desktop.
gitroot, have git in your root.
#!/bin/sh
export GIT_WORK_TREE=/
if [[ "$1" == "autocommit" ]]
then
git status --porcelain | grep -v '^??' || exit 0
exec git commit -a -m 'autocommit'
fi
exec git $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment