updated git.sh

pull/2/head
Hari Sekhon 5 years ago
parent 773545063b
commit 0c0e89b6d6

@ -55,7 +55,6 @@ alias branch="githg branch"
alias br=branch
alias tag="githg tag"
alias um=updatemodules
alias gitgc="du -sh .git; git gc --aggressive; du -sh .git"
alias gbrowse=gitbrowse
type browse &>/dev/null || alias browse=gbrowse
@ -71,6 +70,16 @@ alias staging="switchbranch staging"
alias stage=staging
alias dev="switchbranch dev"
gitgc(){
if ! [ -d .git ]; then
echo "not at top of a git repo, not .git/ directory found"
return 1
fi
du -sh .git
git gc --aggressive
du -sh .git
}
gitbrowse(){
browser "$(git remote -v | awk '/https:/{print $2}' | sed 's,://.*@,://,' | head -n1)"
}

Loading…
Cancel
Save