When you're working with git, you may run across the term "tracking." I'm going to explain what that term is and why it matters.
This post is part of a larger series on :
Let's jump in.
is a big part of development because it's one way that developers work . If you're not sure what git is, why you would use it, how to get it installed, check out some of the other videos in this series.
It's pretty simple. Tracking is when you have a local branch that has a direct relationship with a remote branch. If you are tracking a branch, you can use or without having to type everything out ... . It already knows the correlation between the two branches, so there's no need to be verbose.
When you clone a repository, usually it will establish a tracking relationship between your local branch and remote branch automatically.
If you want to download the code from a remote branch and set up tracking all in one swoop, you can use:
This will create a new branch on your machine with the same name, download the code from the remote repository, and then move you to the new branch on your machine.
Technically, you could set up tracking for a branch on your local machine to point to a branch with a different name on your remote repository...but I wouldn't recommend it. You'll only create confusion.
Receive a weekly email of the Internet's best from articles, to tutorials, to pro tips.