git.ps1
· 908 B · PowerShell
Raw
KEY_FILE="$HOME/.ssh/id_ed25519"
ssh-keygen -t ed25519 -f $KEY_FILE -N ""
git config --list --global
git rm -r --cached path/to/file.ext
Get-ChildItem -Recurse -Directory -Hidden -Filter .git |
ForEach-Object { & git --git-dir="$($_.FullName)" --work-tree="$(Split-Path $_.FullName -Parent)" pull origin master }
git branch |
ForEach-Object { $_.Trim() } |
Where-Object {$_ -NotMatch "^\*"} |
ForEach-Object { git branch -d $_ }KEY_FILE="$HOME/.ssh/id_ed25519"
ssh-keygen -t ed25519 -f $KEY_FILE -N ""
git config --list --global
git rm -r --cached path/to/file.ext
Get-ChildItem -Recurse -Directory -Hidden -Filter .git |
ForEach-Object { & git --git-dir="$($_.FullName)" --work-tree="$(Split-Path $_.FullName -Parent)" pull origin master }
git branch |
ForEach-Object { $_.Trim() } |
Where-Object {$_ -NotMatch "^\*"} |
ForEach-Object { git branch -d $_ }
| 1 | KEY_FILE="$HOME/.ssh/id_ed25519" |
| 2 | ssh-keygen -t ed25519 -f $KEY_FILE -N "" |
| 3 | |
| 4 | git config --list --global |
| 5 | |
| 6 | git rm -r --cached path/to/file.ext |
| 7 | |
| 8 | Get-ChildItem -Recurse -Directory -Hidden -Filter .git | |
| 9 | ForEach-Object { & git --git-dir="$($_.FullName)" --work-tree="$(Split-Path $_.FullName -Parent)" pull origin master } |
| 10 | |
| 11 | git branch | |
| 12 | ForEach-Object { $_.Trim() } | |
| 13 | Where-Object {$_ -NotMatch "^\*"} | |
| 14 | ForEach-Object { git branch -d $_ }KEY_FILE="$HOME/.ssh/id_ed25519" |
| 15 | ssh-keygen -t ed25519 -f $KEY_FILE -N "" |
| 16 | |
| 17 | git config --list --global |
| 18 | |
| 19 | git rm -r --cached path/to/file.ext |
| 20 | |
| 21 | Get-ChildItem -Recurse -Directory -Hidden -Filter .git | |
| 22 | ForEach-Object { & git --git-dir="$($_.FullName)" --work-tree="$(Split-Path $_.FullName -Parent)" pull origin master } |
| 23 | |
| 24 | git branch | |
| 25 | ForEach-Object { $_.Trim() } | |
| 26 | Where-Object {$_ -NotMatch "^\*"} | |
| 27 | ForEach-Object { git branch -d $_ } |