I have already got a local master branch tracking the remote master branch of a github project. Now, a collaborator of mine has created a new branch in the same project, and I want to do the following accordingly:
- create a new branch locally
- make this new branch track the newly create remote branch.
How should I do it properly?
First command makes sure you have remote branch in local repository. Second command creates local branch which tracks remote branch. It assumes that your remote name is
originand branch name isbranch-name.--trackoption is enabled by default for remote branches and you can omit it.