Suppose I've got a simple git repository with a remote named origin:
$ cd test
$ git init
$ git remote add origin [email protected]:project.git
Then if I make a bare clone of it in git 1.7.0.4, it doesn't copy any information about remotes:
$ git --version
1.7.0.4
$ git clone --bare test cloned && cd cloned && git remote
$ # says nothing
With git 1.8.4, however, origin is successfully copied:
$ git --version
1.8.4
$ git clone --bare test cloned && cd cloned && git remote
origin
With corresponding entry in cloned/config:
[remote "origin"]
url = [email protected]:project.git
This just makes a quite popular answer not correct, because git clone --bare && git remote add
no longer works (git refuses to add a remote that has already been added).
My question is: am I missing something in git help that says remotes copying is an expected behaviour since some version of git? And when exactly did this behaviour changed? I couldn't find any information in release notes neither.