1. Find and delete all empty folders in the directory
find . -empty -type d -delete
Source: https://askubuntu.com/a/73711
2. Find and delete all the branches, that no longer has tracked a remote branch
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
Source: https://stackoverflow.com/a/33548037/4213708
The post will be updated.
If you are using any terminal commands repeatedly, please, share them in the comments.
If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.