Create an alias:
git config --global alias.here '!git init . && git add . && git commit --allow-empty -m "Initialize repository"'
then use it like
git here
Please note that I added the parameter --allow-emptyto git commit, which will allow working in an empty directory, as well as with the contents.
source
share