Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
539 views
in Technique[技术] by (71.8m points)

git - Recursively add the entire folder to a repository

I am trying to add a branch to the master branch on GitHub and push a folder onto that branch.

The folder structure of the branch looks like - SocialApp/SourceCode/DevTrunk/SocialApp and all the source code files are in the last folder.

I am using the following Git commands:

git add *
git commit -m with the message
git push

This is pushing only the first folder "SocialApp" onto GitHub and ignoring the folder SourceCode that is inside the folder. How do I fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Check the .gitignore file, if the subdirectory is ignored.

Then try again

git add --all
git commit -am "<commit message>"
git push

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...