I have fixed network of git remotes and I would like them to be attached to repository. Unfortunately git-clone doesn't clone remotes. Is there a way around it?
+1
A:
There is no way to do this with git, as far as I know.
Telling users to run scripts post-clone is what people tend to do. If it's a ruby project, you probably have rake
, for example, so you could have a rake post_install
task.
August Lilleaas
2009-10-15 12:57:29
Is there clone hook in git that could automatize it?
Łukasz Lew
2009-10-15 13:01:32
hooks get created locally when the repository is initialized by whatever implementation of Git is used to clone the repository.
Jörg W Mittag
2009-10-15 13:24:43
+1
A:
Remotes are saved in .git/config
file of a repo, you can extract your favorites and append them on every clone.
che
2009-10-15 12:58:49
+1
A:
You could define them in your global config file ~/.gitconfig
instead of your project's .git/config
. Be careful though... if you run git remote update
in a project it will pull down all remotes, even for repositories completely unrelated to the one you're working on.
Pat Notz
2009-10-15 14:25:09