Git - Remote-tracking branch

1 - About

Remote-tracking branches are local references to the state of remote branches

  • You can't modify them. They’re just local references that you can’t move.
  • They represent the state of the remote repository the last time you connected to them

3 - Syntax

Remote-tracking branches take the form <remote>/<branch>

4 - Example

origin/master and remote/master are two remote-tracking branch.

where:

git remote add remote https://aRemoteUrl
  • the remote where fetched with the following statement
git fetch origin
git fetch remote

5 - Management

5.1 - List

git branch --remotes
# or
git branch -r
* master

5.2 - Delete

git branch -d

6 - Documentation / Reference

code/version/git/remote-tracking.txt · Last modified: 2018/06/11 14:52 by gerardnico