0

The command which I use the most in git are:

git add -A
git commit -a -m "blah blah blah"
git push

So I made an alias of the second command using the command:

git config --global alias.dc 'commit -a -m '

And now in place of second command I can directly write:

git dc "blah blah blah"

It works in command prompt, power shell, git bash, etc. everywhere.

What I want is when I write git dc "blah blah blah" I want all three command mentioned above to be executed.

How can I achieve this?

Note that I want it to be executed globally, not only in git bash.

  • You could try to create a program `git-youralias.exe` (or possibly a bash/batch script) that does those tjings and store it in the `bin` directory of your git installation. – dan1st Sep 08 '21 at 20:09

0 Answers0