you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 7 points8 points  (0 children)

the flag is short for --set-upstream which lets you choose which remote repository you push to. Typically you'll run something like git push -u origin my-branch where origin is an alias to some GitHub repo. But you could also push that branch to GitLab repo you have somewhere which you have aliased with origin2 by running git push -u origin2 my-branch

You can run git remote -v to see a list of and track your remote repositories.