简体   繁体   中英

Git clone --recursive makes file non executable

I have 2 repositories: gs-webui-test-beans and selenium-drivers .

selenium-drivers is a submodule in gs-webui-test-beans .

The file chromedriver_linux64_2.1/chromedriver should be executable on Linux after clone.

When I clone selenium-drivers it is indeed executable.

When I do git clone --recursive on gs-webui-test-beans I check that file again and I see it is not executable.

What am I doing wrong?

You need to init the submodules. Either do

git submodule update --init --recursive

after the clone, or specify the --recurse-submodules option for git clone .

--recurse-submodules

After the clone is created, initialize all submodules within, using their default settings. This is equivalent to running git submodule update --init --recursive immediately after the clone is finished. This option is ignored if the cloned repository does not have a worktree/checkout (ie if any of --no-checkout / -n , --bare , or --mirror is given)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM