Add multiple project in one repository Github

I’m trying to add multiple project in one repository from Github desktop from Macbook but not able to do it.

While trying to commit it show me this error Failed to add file subfoldername/ to index.

  • How to remove permanently added host from list of known hosts?
  • Git still showing deleted files after a commit
  • `git shortlog`: Only count commits that have changed cpp files
  • Can't chmod SSH key for git through git bash on windows 8 embedded
  • determining which merge commit caused a specific commit to be merged into my branch
  • VS2013 git - Project marked as pending delete
  • I have tried to figure out and read some answers but not work from terminal as well. Other one i have tried from here.

    I have added all my folder in one folder main repository then trying to add.

    Is there any other way to do it from Github desktop ?

    Or am i missing something. Somebody have idea please suggest something.

    Thanks in advance. I’ll appreciated if somebody give me some better solution.

  • Should server/database config files, including passwords, be stored in source control?
  • Making it possible to do “git push origin” instead of “git push origin <branch>”, without having to one-time prepare each branch for it
  • Git not using SSH when doing 'git clone'
  • How do I remove a repository from SmartGit?
  • IntelliJ and Git: How to see diffs between a commit and two older commit?
  • How can I use git for projects templates?
  • One Solution collect form web for “Add multiple project in one repository Github”

    Try, from the command line, in a fresh clone of your main repo (assuming your multiple projects are all individual git repositories):

     git clone /url/of/main/repo
     cd repo
     git submodule add /url/of/project1
     git submodule add /url/of/project2
     git submodule add /url/of/project3
     git commit -m "Add multiple projects"
     git push

    This uses git submodules in order to record references to those projects in your main repository.

    Git Baby is a git and github fan, let's start git clone.