Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

git init folder and received submodule message........

Sue Mckinlay July 17, 2018

I am using Terminal instead of Sourcetree for git and bitbucket use.  

My project is iOS app development and when you set up a new app within Xcode with Testing and Core Data, the system sets up files and folders.  So if i want to have the development code within the version control it should have the folders and the files within that.

If it helps, you can see that I have set up and cloned the repository, with 3 items within taken from the screen shot below.  However, I got a message saying that i was adding a repository within a repository (i take it folders are seen as a separate repos) and it's asking me to add a submodule.....  Done a search within bitbucket but cant seem to find anything appropriate. I just want one version control on all files, including 'submodules' and their contents.

Any help very much appreciated,

 

Screen Shot 2018-07-17 at 11.11.16.png

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2018

Hi Sue! If you're getting the message that you're adding a repository within a repository, it means the folders inside the main one have also been initialized as a repo at some point. Check inside them for a .git folder (it might be hidden depending on the OS you're using). 

A git repository within other git repository is what git calls 'submodules'. You can read more about it at Git Submodules. For a tutorial on how to add them, you can check Bitbucket and Git submodules.

As a side note, you also submitted a question saying that you messed up with a repository, let us know if you were referring to this same issue so we can put all together for better context :) 

Hope that helps!

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events