user9735824
user9735824

Reputation: 1256

what is the use of "remote tracking branch" in egit

I am new to git and egit. First thing i did was i clone one git repo. Now when I switch to git repositoy view in eclipse, I can see Local and Remote Traking folder under branch. I am not sure what is the purpose of Remote tracking here ?

Upvotes: 1

Views: 1099

Answers (1)

howlger
howlger

Reputation: 34135

The use of remote tracking branch in EGit is the same as in the command line Git:

Under Local all local and under Remote Traking all remote branches are listed. You can only work on a local branch and in a remote branch, you can see the history (until the last fetch) from the remote repository.

A typical use case is to check out a remote branch as a new local branch. The upstream branch of the newly created local branch is then the remote branch from where you created the branch.

  • The fetch command is to update your remote tracking branches only.
  • The pull command gets, in addition, the fetched changed into your current checked-out local branch.

Upvotes: 2

Related Questions