The first time you push a git branch to a remote, you have to be explicit the
first time:
git push origin my-branch-name
Every time after that, a simple git push will work fine. But there’s a
~/.gitconfig setting that will let you just git push without needing that
initial explicitness:
[push]
# Push current branch even if you've never pushed it before
default = current
You might want to take a look at my
gitconfig for more
tips.
About thoughtbot
We've been helping engineering teams deliver exceptional products for over 20 years. Our designers, developers, and product managers work closely with teams to solve your toughest software challenges through collaborative design and development. Learn more about us.
Could your team use a boost?
Ensure your team is moving as quickly as you need it to with thoughtbot's Team Augmentation. Our expert designers and developers embed in teams to hit tough goals while strengthening collaboration and communication.