S
S
stepaniwe2018-05-07 04:35:34
git
stepaniwe, 2018-05-07 04:35:34

What does -u mean in Git?

for example, what does -u mean in the git push -u origin master command?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-05-07
@stepaniwe

git push --help ? no, I didn't hear it!!!!

-u, --set-upstream
For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-
pull(1) and other commands. For more information, see branch..merge in git-config(1).

What is the difference between git push -u origin master and git push origin master? Why the -u switch for the git push command?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question