# This is Git's per-user configuration file. [alias] wip = "!sh -c \"WIP_STRING=\\\"wip: version\\\"; DEFAULT_VERSION=1; LAST_COMMIT_MSG=\\$(git log -1 --pretty=%B); LAST_VERSION=\\$(echo \\\"\\$LAST_COMMIT_MSG\\\" | grep -oP \\\"\\$WIP_STRING \\\\K\\\\d+\\\"); if [[ -z \\$LAST_VERSION ]]; then LAST_VERSION=\\$DEFAULT_VERSION; else LAST_VERSION=\\$((LAST_VERSION + 1)); fi; git add --all; git rm \\$(git ls-files --deleted) 2> /dev/null; git commit --message \\\"\\$WIP_STRING \\$LAST_VERSION\\\" --no-verify; echo \\\"wip commit created with version \\$LAST_VERSION\\\";\"" rewip = !git rebase -i HEAD~$(git log --grep=\"^wip\" --format=%h | wc -l)