Home git What is the difference between Track, Set-Upstream-to and Set-Upstream?

What is the difference between Track, Set-Upstream-to and Set-Upstream?

Author

Date

Category

I can not figure out the topic “Tracking branches”

There are 3 teams that seem to be exhibited for the branch tracking on a remote branch:

git branch --Track
Git Branch --Set-Upstream-To
Git Branch --Set-Upstream

For me, so they do the same thing. I do not understand why then their as many as 3 pieces?


Answer 1, Authority 100%

Flag - Track can only be used when creating new races

Flags - set-upstream and - set-upstream-to change upstream for an already existing branch (if not specified - Force ). You can read - Track Shouting for - Set-Upstream --Force

New - set-upstream-to differs from the old - set-upstream order of arguments, which allows you to change the Upstream for the current brunch without explicitly specifying it:

git branch --set-upstream-to = origin / master

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions