1

I'm really annoyed I have to do

`git push --set-upstream origin <my_branch>`

every time for new git branch. Is there any way I can skip it? I found this https://github.com/nvbn/thefuck

but I'm looking for solution that skip push --set-upstream

Fay Chen
  • 521
  • 1
  • 4
  • 12
  • Does this answer your question? [Why do I need to do \`--set-upstream\` all the time?](https://stackoverflow.com/questions/6089294/why-do-i-need-to-do-set-upstream-all-the-time) – byxor May 13 '22 at 15:58
  • 1
    Make yourself an alias, `git pushnew` for instance, that does `git push -u origin HEAD`. – torek May 14 '22 at 03:09

1 Answers1

0

As I understand you don't want to skip it per se, you still want to set upstream but without so much hustle, right? In that case, you can use a shortcut:

git push -u origin <my_branch>
kthnd
  • 51
  • 4