Created
January 4, 2019 21:03
-
-
Save stuartwakefield/8767cd78521265c1dde0ff46e1bb2df5 to your computer and use it in GitHub Desktop.
Some useful bash scripts for cleaning up code workspaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Checks the Git status of all subdirectories of the current directory, i.e., | |
# whether it has a Git repository, if the working copy is dirty / has uncommitted files, | |
# the status and tracking of local branches and whether the local repository is connected | |
# to a remote repository. | |
find . -maxdepth 1 -type d | xargs -I '{}' bash -c 'echo ----- {} ; git -C {} status ; git -C {} branch -vv ; git -C {} remote -v' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Gets the content size of all subdirectories of the current directories | |
find . -maxdepth 1 -type d | xargs du -sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment