Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is "remote tracking branch" in TortoiseGit?

How to find "remote tracking branch" in TortoiseGit to set default branch to pull from?

Description image

like image 812
Navruz Madibragimov Avatar asked Mar 27 '18 15:03

Navruz Madibragimov


People also ask

How do I find my remote repository branch?

If you have a single remote repository, then you can omit all arguments. just need to run git fetch , which will retrieve all branches and updates, and after that, run git checkout <branch> which will create a local copy of the branch because all branches are already loaded in your system.

What are remote tracking branches?

Remote-tracking branches are references to the state of remote branches. They're local references that you can't move; Git moves them for you whenever you do any network communication, to make sure they accurately represent the state of the remote repository.

How do I change the tracking on my remote branch?

You need to unset the current remote tracking branch first: git branch --unset-upstream - then it works as given in this answer (or with the next git push -u / --set-upstream ).

Which command can be used to track a remote branch?

You can tell Git to track the newly created remote branch simply by using the -u flag with "git push".


1 Answers

Open the "Browse Refs" dialog (cf. https://tortoisegit.org/docs/tortoisegit/tgit-dug-browse-ref.html). There you can see all local branches and the corresponding remote-tracking branches (you can change the remote-tracking branch using the context menu).

https://tortoisegit.org/docs/tortoisegit/images/BrowseRef.png

On the pull and fetch dialog, the currently set remote tracked branch should be selected automatically (based on the current local branch) - or the last used remote branch is preselected.

PS: In order to automatically set it up on push, just enable "Set upstream/track remote branch" on the push dialog.

PSS: On the push dialog, there are some TGit specific options, that allow you to have an remote tracked branch (e.g., master from upstream), but store another default where you push to (e.g., master from origin; cf. https://tortoisegit.org/docs/tortoisegit/tgit-dug-push.html).

like image 166
MrTux Avatar answered Oct 23 '22 05:10

MrTux