Why do I need to explicitly push a new branch?

I am new in git and I am practicing. I created a local branch but I saw that when I did git push my branch was not uploaded to the repository. I had to actually do: git push -u origin --all.
Why is this? Isn’t a branch a new change to be pushed by default? Why do I need to run the second command?

8 Answers
8

Leave a Comment