-
-
Save Kavignon/76778cc0913cafaf6e51f3f604752b1a to your computer and use it in GitHub Desktop.
My favorite PowerShell snippets
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
# List of usefull snipets I always reuse. | |
# Get all file types | |
$extensionList = @((Get-ChildItem -Recurse -File).Extension); | |
$extensionList | Select-Object -Unique | |
# Snippets for git support in the team | |
# ------------------------------------------- | |
# When someone cannot checkout the files from lfs (whatever the user does, the file remain empty with a size of 1K) | |
# Experienced with git lfs version: 2.9.2 | |
# Try the standard way to get the file with the following: | |
git lfs fetch --all | |
git lfs checkout | |
# If this does not work, se the following sequence to clear the caches: | |
# ( Make sure there are no uncommitted changes. If there are some, commit the work if required before proceeding. ) | |
git rm -r --cached . | |
git reset --hard | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment