This is not a direct answer, but too large for comment. I just tried to reproduce your situation, and it works as expected for me (without downloading from the bitpack to the pull).
Some possible reasons why this does not work for you:
1) Check the colleagues repository - does it have the correct remotes setting? I'm not sure, but git probably uses remotes metadata to understand the relationships between repositories (just a hunch)
2) Maybe the repository of colleagues is not updated with a bitbucket? So when you do this, it just loads the new data. Try updating your peers repository first.
Here is the shell script I used to test the problem, you can play around with something like this to find out what causes the behavior you see:
The output for each command is included above, you can see that the initial repository download was downloaded to the project folder (this emulates the colleagues repository), and then there is no download in the local repository when renaming the source, add a new origin as the bitbucket and go git pull origin URL git pull origin .
Update: check with two versions of git
As mentioned in the comments to another answer, there are two versions of git - git 1.9.4 on a peers computer and git 2.1.4 locally. I also have 2.1.4 locally, so I additionally get version 1.9.4 as follows:
git clone git://git.kernel.org/pub/scm/git/git.git git checkout v1.9.4 make configure ./configure --prefix=/usr make all ./git --version
Now I modified the test script as follows:
# Change this to your repository url BITBUCKET_URL=git@bitbucket.org :bosonz/gameofdata.git GIT194=./git/git $GIT194 --version $GIT194 clone $BITBUCKET_URL project
Result - there are still no problems, downloading from bitbucket is performed only once.
Boris Serebrov
source share