I want to create a branch from an existing remote branch (let\'s say remote-A) and then commit the changes to the repository.
I have used the below commands to create a
I wanted to create a new local tracking branch from a remote git branch with a different name.
So I used this command:
git checkout -b
Example:
git checkout -b local-A --track origin/remote-A
I saw it in multiple comments to the above answers, but it's good to have it in the first sight.
Tracking branches are local branches that have a direct relationship to a remote branch. If you're on a tracking branch and type git pull, Git automatically knows which server to fetch from and which branch to merge in.