Supports bare repo and defaults to create a bare repo
Fixed an issue that commits sometimes contains working tree deletions