PNech NETWORK
PNech NETWORK

Reputation: 1

Git-gui did not add "tracking branch"

please explain how add tracking branch in git-gui, when starting new local repository from scratch. started from scratch

If im truing clone the same repository in another folder, it gives me my "origin/master" tracking branch. if clone same repository

What the difference?

Upvotes: -2

Views: 39

Answers (2)

PNech NETWORK
PNech NETWORK

Reputation: 1

I dont know why git-gui didn`t have such setting. But, to solve this problem, you must go to Git Bash and set upstream by yourself.

git branch --set-upstream-to origin/master master

then restart git-gui

Upvotes: -1

j6t
j6t

Reputation: 13377

You can specify a new remote, select Remote->Add, then specify origin as Name and an appropriate https URL in Location.

This only establishes the connection between the freshly initialized repository and a repository located remotely. You must allocate the remote repository (that is located at the given URL) yourself. Git GUI does not do it for you.

After you have established the connection, you must fetch the remote branches (if any) using Remote->Fetch from->origin. This allocates the tracking branches.

These steps are identical to the following commands:

git remote add origin https://....
git fetch origin

It seems that at this point you must restart Git GUI. Now Merge->Local merge will offer tracking branches. If there are none offered, then the remote repository does not have any data, yet.

Upvotes: 0

Related Questions