Ulli H Ulli H - 4 months ago 17
Git Question

GitHub: how to add Subfolders to a GitHub-Repository

I´m very new in GitHub (since yesterday ;-)) and want to add files & folders

In my Xcode-Project i have this Folder-/File-Structure:

enter image description here

entries with the folder-icon as CodeDataTest, Classes, Model,... are Folders, the rest are files.
Now i want to add these structure to my new GitHub-Repository as shown.

I googled a lot but found no solution. :-(

Can you help me?

Thanks in advance!

Answer

1.Login GitHub, then click Start a Project -> Create a new repository, input your name CoreDataTest

2.Run git init in your local CoreDataTest directory.

3.Run the following command:

git remote add origin git@github.com:xxxx/CoreDataTest.git

4.Finally, push local repository to remote

git push -u origin master