Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

Am I explaining "track" correctly with this explanation?

Generally when I using GIT, my bottom line is the "origin / master" branch. That's what I cloned to create my local master branch and everything that I do is going to be held up to the light of "origin / master" when it comes to what is going to be pushed to PROD.

Right.

Recently, our shop had to make some changes that resulted in "origin / master" no longer being the most accurate and reliable body of code. Instead, it was a different branch. This is temporary because of some updates that are happening, but in order to make sure that my box was up to date with the most accurate syntax, instead of wiping out all of the files on my local box and starting over, I simply did this:

PS C:\Users\bgust\documents\DevServer> git checkout --track origin/biq-php7-audit-merge

"biq-php7-audit-merge" is the code that represents all of the most recent fixes that I need to have on my local box.

Rather than simply checking out a branch, by adding "--track," I'm now telling GIT that "origin-master" is no longer the "newest and the best." So, when I do a "pull," for example, to make sure that my code is up to date, GIT will not be pulling from "origin / master," rather it will be pulling from "origin/biq-php7-audit-merge."

That's what makes "--track" significant.

Correct?
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

Thanks, gonzo!