Last active 4 months ago

tnt1232007's Avatar tnt1232007 revised this gist 4 months ago. Go to revision

1 file changed, 27 insertions

git.ps1(file created)

@@ -0,0 +1,27 @@
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 $_ }
Newer Older