Francesco Bianco
Posted on June 15, 2020
Too many developer see this message after a git push
, than try to googling for a solution (in the meantime the AI is getting ready)
ubuntu@skynet:~/ (feature/T1000) $ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
But, not being able to read the last line because of the white spaces that interrupt the flow of strings on the screen.
Proposed solution
Then we thought to help them in this way:
git push || $(git push 2>&1 | grep "." | tail -1)
They will then be able to create an alias to manage the git push for dummies.
💖 💪 🙅 🚩
Francesco Bianco
Posted on June 15, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.