When to use git branch --track (meaning of start "watching upstream")?

Viewed 6409

Until recently, I have not been aware of --track switch for git branch. I read the documentation and tried this command, but it has no sense to me.

--track

When creating a new branch, set up branch.<name>.remote and branch.<name>.merge configuration entries to mark the start-point branch as "upstream" from the new branch. This configuration will tell git to show the relationship between the two branches in git status and git branch -v. Furthermore, it directs git pull without arguments to pull from the upstream when the new branch is checked out.

This behavior is the default when the start point is a remote-tracking branch. Set the branch.autoSetupMerge configuration variable to false if you want git checkout and git branch to always behave as if --no-track were given. Set it to always if you want this behavior when the start-point is either a local or remote-tracking branch.

I can see that people relate to this switch when they want to make branch track upstream branch

What does it mean? Is it me or this switch description is confusing. When I use term upstream, I refer to the another remote repo (fork) that I can push changes to.

What happens when I start tracking remote branch? How does it manifest locally?

2 Answers
Related