I know that the push command sends the file to the virtual repository, but I do not know what PUSH -U does
I know that the push command sends the file to the virtual repository, but I do not know what PUSH -U does
Defines the default remote branch for the current local branch.
Any git pull
future command (with the local branch checked-out)
will try to bring commits from <remote-branch>
current local branch.
One way to avoid having to explicitly --set-upstream
is
use the abbreviated flag -u
, along with git push
as follows
git push -u origin local-branch
This sets the upstream association for any future push / pull attempts automatically.
Reference is here !