`--name` option doesn't work with `git submodule add` command -
i want add together git submodule different name like:
git submodule add together --name foo git@bitbucket.org:ironsand/cookbook-foo.git
i wanted create git submodule directory named foo
, repository created name cookbook-foo
.
most i'm doing wrong, don't know wrong.
how can alter name of git submodule directory?
don't conflate path , name of submodule. want run
git submodule add together git@bitbucket.org:ironsand/cookbook-foo.git foo/
instead. more details, see git-submodule
man page; relevant git-submodule
syntax here is
git submodule [--name <name>] <repository> [<path>]
where...
<repository>
url of new submodule's origin repository. <path>
, if specified, determines name of subdirectory (of superproject's root directory) receive clone of repo living @ <repository>
; if left unspecified, <path>
defaults name of repo. <name>
submodule's name, i.e. name appear in corresponding submodule entry in .gitmodules
file; if left unspecified, <name>
defaults <path>
. here toy illustration prepare ideas:
$ cd ~/desktop $ mkdir test $ cd test $ git init $ git submodule add together --name brutus https://github.com/bradfitz/gitbrute bradfitz_bruteforce $ ls -a . .git bradfitz_bruteforce .. .gitmodules $ cat .gitmodules [submodule "brutus"] path = bradfitz_bruteforce url = https://github.com/bradfitz/gitbrute
git
No comments:
Post a Comment