git init git remote add origin ... git push origin (git ls-remote origin | grep "refs/heads/master" | cut -f1 ):master