@[email protected] to [email protected] • 2 days agoWhat's a handy terminal command you use often?message-square260fedilinkarrow-up1214arrow-down17
arrow-up1207arrow-down1message-squareWhat's a handy terminal command you use often?@[email protected] to [email protected] • 2 days agomessage-square260fedilink
minus-squareJackbyDevlinkfedilinkEnglish2•9 hours agogit config --global alias.pusho 'push --set-upstream origin HEAD' You’re welcome.
minus-squareJackbyDevlinkfedilinkEnglish1•edit-23 hours agoWhen you’re pushing a new branch you’ve never pushed before you need the -u command. That’s what this alias is for. As long as the config’s push.default isn’t matching, git push without arguments will only push the current branch.
git config --global alias.pusho 'push --set-upstream origin HEAD'
You’re welcome.
So that’s making
git push
always push to the current branch?When you’re pushing a new branch you’ve never pushed before you need the
-u
command. That’s what this alias is for.As long as the config’s
push.default
isn’tmatching
,git push
without arguments will only push the current branch.