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/D
Both "git add *" and "git add SocialApp" called from top directory should add recursively all directories.
Probably you have no files in SocialApp/SourceCode/DevTrunk/SocialApp and this is the reason.
Try to call "touch SocialApp/SourceCode/DevTrunk/SocialApp/.temporary" (and check .gitignore) and then try git add again.
I simply used this:
git add app/src/release/*
You simply need to specify the folder to add and then use *
to add everything that is inside recursively.
This worked for me:
git add . --force
In my case, there was a .git folder in the subdirectory because I had previously initialized a git repo there. When I added the subdirectory it simply added it as a subproject without adding any of the contained files.
I solved the issue by removing the git repository from the subdirectory and then re-adding the folder.
Check the .gitignore
file, if the subdirectory is ignored.
Then try again
git add --all
git commit -am "<commit message>"
git push
Navigate to the folder where you have your files
if you are on a windows machine you will need to start git bash from which you will get a command line interface then use these commands
git init //this initializes a .git repository in your working directory
git remote add origin <URL_TO_YOUR_REPO.git> // this points to correct repository where files will be uploaded
git add * // this adds all the files to the initialialized git repository
if you make any changes to the files before merging it to the master you have to commit the changes by executing
git commit -m "applied some changes to the branch"
After this checkout the branch to the master branch