Skip to content

Instantly share code, notes, and snippets.

View kunicmarko20's full-sized avatar
๐ŸŒ€

Marko Kunic kunicmarko20

๐ŸŒ€
View GitHub Profile
@kunicmarko20
kunicmarko20 / cd alias
Created December 14, 2016 09:09
Check for active git branch when changing folder
alias cdg=gitdir
gitdir(){
cd $1
count=$(find . -name .git -type d -maxdepth 1 | wc -l)
if [ $count -gt 0 ]; then
git branch
fi
}