Collection of useful powershell scripts and modules published to PowerShell Gallery
Deletes orphan branches deleted from remote but present in local.
Install-Module -Name GitCleanOrphanBranches
rgob
- Go to a git directory and run
Remove-GitOrphanBranches
- Pass
Y
when prompted.
Deletes bin, obj folders recursively.
Install-Module -Name DeleteBinObjFolders
rbof
- Run
Remove-BinObjFolders
- To exclude few folders pass
Exclude
parameter with comma separated strings.
Remove-BinObjFolders -Exclude folder1,folder2,folderN
- Pass
Y
when prompted
Install-Module -Name GetLockingProcess
glp
- Run
Get-LockingProcesses -Path {path}
Warning
Windows only
Install-Module -Name RemoveTempFiles
None.
- Run
Remove-TempFiles
.
Warning
Windows only
Install-Module -Name Rename-GitBranch
None.
- Run
Rename-GitBranch -OldName {old-branch-name} -NewName {new-branch-name} -Remote {default:origin}
. - Run
Rename-GitBranch -OldName {old-branch-name} -NewName {new-branch-name} -Remote {default:origin} -DryRun
with dryrun flag to know what commands will run.