How can I group these 3 commands:
git init
git add .
git commit -m "Initialize repository"
I have this of course, but I'm looking for something shorter & more elegant if that exists:
me@local:~$ git init; git add .; git commit -m "Initialize repository"
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
Note that I added the --allow-empty
option to git commit
, which will let this work in an empty directory as well as one with content.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With