I recently switched to upstream for my git push configuration (meaning only the current branch will be pushed to its upstream counterpart), to avoid unexpected things being pushed. However, there are some times I’m sure I want to have the default push behaviour (being matching), and push all branched to their matching counterparts. How can I achieve that without changing my configuration ? I’ve seen git push can have an --all options, but it looks like it pushes all branches. As I cannot test it right now, I’m turning to you guys.
Thanks for your time!
Why can’t you just do
git push origin branchnameor set an alias for that and keep doing that without changing any configuration? That way yourgit pushwill remain the normal default.