Problems using project template

I'm looking to use I, Voyager as the base for a satellite visualisation tool. I'm new to Godot, GitHub/Git, and obviously I, Voyager,

I followed the tutorial provided here, and everything went smoothly. I used the project template, used the git clone --recursive-submodule command, everything. 

However, even after several tries, the submodule does not appear in my repository when I clone it. I decided not to fork the I, Voyager submodule. The rest of the template is present (as well as the assets), but the submodule does not appear, not matter how many times I try,

I followed the tutorials very carefully.

I did some research into it, and saw someone say in January of 2020 that templates do not work with submodules. Is this the case? If so, how can I proceed?

(also, as a side note, the desired file/directory structure mentioned at the start of the tutorial - in Overview - does not match the project template. Which one is "correct")

Comments

  • edited July 2020
    The problem is that I use GitKraken so I am terrible at git command line!

    I believe the tutorial step #4 is missing something based on answers here: https://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules. It seems that "cloning" does not actually populate the submodule. For that (according to linked discussion thread) you need to cd into the repository, then use command "git submodule update --init --recursive".

    Please let me know if that works. If it does I'll fix the tutorial. (GitKraken sidesteps this problem: it explicitly asks you if you want to init the submodule after cloning the project.)

    What inconsistency do you see in the tutorial "file/directory structure"? It looks correct to me.
  • edited July 2020
    Charlie W said:
    The problem is that I use GitKraken so I am terrible at git command line!

    I believe the tutorial step #4 is missing something based on answers here: https://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules. It seems that "cloning" does not actually populate the submodule. For that (according to linked discussion thread) you need to cd into the repository, then use command "git submodule update --init --recursive".

    Please let me know if that works. If it does I'll fix the tutorial. (GitKraken sidesteps this problem: it explicitly asks you if you want to init the submodule after cloning the project.)

    What inconsistency do you see in the tutorial "file/directory structure"? It looks correct to me.

    I tried using "git submodule update --init --recursive", however it still didn't work.

    I think the problem stems from something different, however. 

    When I select "Use This Template" on GitHub, and then set up my new repository with i-voyager-template as a template, the submodule folder is never actually created.

    As you can see in the screenshots below, while the submodule folder is in the template, it isn't in the repository I made based off the template:

    The i-voyager-template on GitHub:


    My repository using i-voyager-template as a template (on GitHub, however problem persists even after cloning locally):


    As you can see, on the template the submodule appears, however when using it as a template for my own repo, the submodules does not appear.

    I think this is the source of the issue, however I could be wrong. That's why I think "git submodule update --init --recursive" did not work - there was no folder to populate.

    I then tried to manually create a folder in my locally-cloned repo with the same name as the submodule, then try the commands you mentioned. Again, it didn't work.

    Thanks for your help, hopefully I can get to the bottom of this problem. If no one can find a solution, I'll just use GitKraken.

    (also, there are no inaccuracies in the "file/directory structure" - I misread)

    (p.s, I love what you've made here. It's fantastic that you're offering it for free, and the planetarium itself is stunning!)
  • edited July 2020
    Your images above are a bit too small for me to read. Do you see a ".gitmodules" file? This is actually what tells git that there is a submodule, what to call it locally, and where to find it. You can open with a text editor. It should look like this:
    [submodule "ivoyager"]
    	path = ivoyager
    	url = https://github.com/ivoyager/ivoyager
    Note that your local computer might hide files that start with "." (you'll have to root around in folder view settings to fix that). If you fork ivoyager at some later time, you will edit this file to point to your fork.

    At github.com (you're "remote" repository) you would want to see something like "ivoyager @ a56288c". It's not actually a directory, but rather a link to a particular ivoyager commit (which could reside at our repository or your fork of it). It's only in you local repository that you see an actual "ivoyager" directory with contents (when all is working).

    [Edit: but you won't see "ivoyager @ a56288c" until you have inited the submodule in your local repository AND pushed you changes back to remote. It's the init step that creates and populates "ivoyager" directory locally. It's the push that will update the remote.]

    It's possible that creating the "ivoyager" directory manually might have confused git at the init step. Command line git often doesn't give any feedback when or why things don't happen. For example, it may be expecting you to commit the changes you made (e.g., manually creating "ivoyager" directory) or dispose of them before letting you init a submodule. This is all very clear to expert git users.

    This is the reason I opted for GitKraken in the first place. Git is a history preservation tool. You have to be able to "see" that history to use it successfully. Experts can "see" their history well enough using available git command line instructions. But for me a Git GUI was necessary.

  • Charlie W said:
    Your images above are a bit too small for me to read. Do you see a ".gitmodules" file? This is actually what tells git that there is a submodule, what to call it locally, and where to find it. You can open with a text editor. It should look like this:
    [submodule "ivoyager"]
    path = ivoyager
    Note that your local computer might hide files that start with "." (you'll have to root around in folder view settings to fix that). If you fork ivoyager at some later time, you will edit this file to point to your fork.

    At github.com (you're "remote" repository) you would want to see something like "ivoyager @ a56288c". It's not actually a directory, but rather a link to a particular ivoyager commit (which could reside at our repository or your fork of it). It's only in you local repository that you see an actual "ivoyager" directory with contents (when all is working).

    [Edit: but you won't see "ivoyager @ a56288c" until you have inited the submodule in your local repository AND pushed you changes back to remote. It's the init step that creates and populates "ivoyager" directory locally. It's the push that will update the remote.]

    It's possible that creating the "ivoyager" directory manually might have confused git at the init step. Command line git often doesn't give any feedback when or why things don't happen. For example, it may be expecting you to commit the changes you made (e.g., manually creating "ivoyager" directory) or dispose of them before letting you init a submodule. This is all very clear to expert git users.

    This is the reason I opted for GitKraken in the first place. Git is a history preservation tool. You have to be able to "see" that history to use it successfully. Experts can "see" their history well enough using available git command line instructions. But for me a Git GUI was necessary.

    Yeah, I ended up just using GitKraken, and it's all working now. Thank you for your help!
    Again, what you're doing here is incredible!
Sign In or Register to comment.