Last active
July 31, 2019 20:52
-
-
Save janjaali/3ddec1dd05ae30f47a4df627ae379f25 to your computer and use it in GitHub Desktop.
Some little helpers
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
# Creates zip-archives for each directory in the current path | |
Get-ChildItem . | ForEach-Object { | |
if ($_.PSIsContainer) { | |
$dirName = $_.Name | |
$zipName = "$dirName`.zip" | |
echo "Compress $dirName" | |
Compress-Archive -Path $dirName\* -DestinationPath $zipName | |
} | |
} | |
# Removes all local branches expect for the current one | |
git branch -d $(git branch --format '%(refname:short)') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment