[Git] set-upstream

When you want to push your local branch to remote branch, for the first push:

git push --set-upstream origin <branch_name>

 

The reason to set 'up-stream'  is that you want this branch to be tracked against, so you can just type:

git push

 

Tips:

git push -u origin <branch_name>

is the same the --set-upstream

 

你可能感兴趣的:([Git] set-upstream)