mirror of https://github.com/captn3m0/Scripts.git
git commands
This commit is contained in:
parent
8b8f0f83d0
commit
fa357e64a0
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do
|
||||
git branch --track "${branch##*/}" "$branch"
|
||||
done
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# work over each commit and append all files in tree to $tempFile
|
||||
tempFile=$(mktemp)
|
||||
IFS=$'\n'
|
||||
for commitSHA1 in $(git rev-list --all); do
|
||||
git ls-tree -r --long "$commitSHA1" >>"$tempFile"
|
||||
done
|
||||
|
||||
# sort files by SHA1, de-dupe list and finally re-sort by filesize
|
||||
sort --key 3 "$tempFile" | \
|
||||
uniq | \
|
||||
sort --key 4 --numeric-sort --reverse
|
||||
|
||||
# remove temp file
|
||||
rm "$tempFile"
|
Loading…
Reference in New Issue