Hello @cvrr !
Yes that would make a difference !
--set-upstream tells Git to set the upstream branch for the current local branch. The upstream branch is the branch on the remote repository that you want to keep your local branch synchronized with.
If you use the same without --set-upstream --> It will still push it to the remote repo but it wont set the upstream for testbranch.
So the difference you will see during pulling,
if you don't use --set-upstream , you have to do:
git pull origin <branch>
But if you do: git push --set-upstream origin <branch>
then, when pulling, you only have to do: git pull
The --set-upstream option in git push links your local branch to the corresponding remote branch. This means that, in the future, you can just use git pull or git push without specifying the branch. If you remove --set-upstream, the push will work for that instance, but the upstream link won't be set, so you'll need to specify the remote branch in subsequent pulls or pushes for that local branch.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.