Reputation: 9857
I have a git repository established by TortoiseGit which pulls updates from all remote branches regardless of which branch it is locally.
git.exe pull -v --progress "origin"
But when i copy that repository directory to another directory, and have TortoiseGit create a brand new branch, its pull command narrows its scope to just that branch.
git.exe pull -v --progress "origin" test
I cannot find anything in TortoiseGit that controls this behaviour. What should be done to revert this configuration?
Upvotes: 4
Views: 7706
Reputation: 9857
I opened a Git bash console to run a general pull, and it mention the main branch for this directory is not being tracked. I do not know the difference in behaviour between TortoiseGit and raw Git.
$ git pull
remote: Counting objects: 32, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 23 (delta 19), reused 0 (delta 0)
Unpacking objects: 100% (23/23), done.
From bitbucket.org:repository
50bf7c6..a08a735 master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with. See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream test origin/<branch>
So I ran the suggestion
user@MACHINE /D/Projects/test_branch (test)
$ git branch --set-upstream test origin/test
Branch test set up to track remote branch test from origin.
And after that TortoiseGit appears to now be able to pull with a broader scope.
git.exe pull -v --progress "origin"
While it has achieved what i was desiring, i do not have the fundamental understanding to properly tell why TortoiseGit behaves the way it does.
Upvotes: 1
Reputation: 6735
Are those branch being tracked?
git branch -vv
For example, if you want to track local branch test
with remote branch test
:
git branch -u origin/test test
Then you can perform a git pull
.
Upvotes: 0