简体   繁体   中英

how do I add a submodule to my repos

I cloned octopress from github.

When I try to add directories in there, I get the following error:

git add source/*
fatal: Pathspec 'source/about' is in submodule 'octopress'

You add the source/* directly. you have to go into the folder and then add and commit your content it it.

Submodules are standlone folders (repositories)and you have to add and commit files within the directory itself.

cd source

# add the content 
git add .

# Commit the changes
git commit -m "Added Octopress source"

# push updates
git push origin <branch name>

Since you have modified the source directory of Octopress you also need to generate the content to be sure that you have the latest generated files.

# generate the content
rake generate

# Deploy the changes in case you need to deploy them.

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