递归地将整个文件夹添加到存储库 [英] Recursively add the entire folder to a repository

查看:226
本文介绍了递归地将整个文件夹添加到存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



分支的文件夹结构看起来像 -
SocialApp / SourceCode / DevTrunk / SocialApp和所有源代码文件都位于最后一个文件夹中。



我使用git以下命令:

  git add * 
git commit -m与消息
git push

这只会将第一个文件夹SocialApp推送到GitHub上,并忽略文件夹内的文件夹SourceCode。如何解决这个问题?

解决方案

检查 .gitignore 如果该子目录被忽略。



然后再试一次

  git add -  all 
git commit -am<提交消息>
git push


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 git following 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?

解决方案

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

Then try again

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

这篇关于递归地将整个文件夹添加到存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆