Using Shell Command in Git Alias
![Arunvel Sriram](https://cdn.hashnode.com/res/hashnode/image/upload/v1689689718012/mbhO7FFuH.jpg)
1 min read
We can prefix the Git Alias with !
to make it a shell command instead of sub-command to git
.
git config --global alias.statuses \
'!for repo in $(find * -type d -maxdepth 0); do echo "\n=========$repo==========\n" && git -C $repo status; done'
Now git statuses
command will get status of each Git repo in the current directory.
1
Subscribe to my newsletter
Read articles from Arunvel Sriram directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
![Arunvel Sriram](https://cdn.hashnode.com/res/hashnode/image/upload/v1689689718012/mbhO7FFuH.jpg)
Arunvel Sriram
Arunvel Sriram
Engineering @ Equal Experts | Ex-Thoughtworks | DevOps | Polyglot | Backend | Open Source