At some point, it is very likely that you have cloned somebody's repository. This means that you have an associated remote. The remote is usually called origin because it is where the source originated from.
While working with Git and remotes, you will get some benefits from Git.
We can start with git status and see what we get while working with the remote.
Follow these steps:
$ git checkout -b remoteBugFix --track origin/stable-3.2
Branch remoteBugFix set up to track remote branch stable-3.2 from origin.
Switched to a new branch 'remoteBugFix'
- The previous command creates and checks out the
remoteBugFix
branch that will track theorigin/stable-3.2
branch. Therefore, for instance, executinggit status
will automatically show how different your branch is fromorigin/stable-3.2
, and it will also show whether your branch'sHEAD
can be fast forwarded to theHEAD
of the remote branch or not...