Git source control forgets to add Source directory

When creating a new C++ “Base” project, and adding it to git and “submitting” the changes, the top-level Source directory is not added to git.

Also the .gitignore and the .uproject files are not added either.

I should also note that I’m using OSX 10.11 (El Capitan).

Here is a step-by-step:

  • New Project > C++ > Basic Code. No Starter Content.

  • Wait for the project to be generated and for Xcode to open and note that you cannot open any Unreal Editor windows; there is a menu but no windows appear (another issue).

  • Quit Unreal Editor from the Dock and reopen the project. Get a crash from somewhere, but the project opens.

  • Source Control > Connect to Source Control > git (beta). Select “Add a .gitignore file” and press “Initialise project with git” and then “Accept Settings”.

  • Source Control > Submit To Source Control.

  • Go to terminal and change to project base and type git status:

    typhon:GitTest andy$ git status
    On branch master
    Changes to be committed:
    (use “git reset HEAD …” to unstage)

     new file:   .gitignore
     new file:   GitTest.uproject
    

    Untracked files:
    (use “git add …” to include in what will be committed)

     Build/
     Source/

Hello trojanfoe,

I attempted doing what you described but I didn’t run into any problems. Can you give me a step by step method of how you’re adding your project to git, submitting it, and so on?

OK, updated my bug report. I forgot that the .uproject isn’t added either and there are couple of other issues along the way.

I’m fairly certain that the editor’s Git plugin will only submit things that have been edited inside the editor. To make the initial commit (for things such as what you’re mentioning), you’ll need to do that outside of the editor with your Git GUI of choice, such as TortoiseGit or Git’s desktop client.

As for the editor not opening as soon as the project is created, are you using an engine built from Source? If so, it does not do an initial compile when creating a code project meaning that the .dll has not been created yet. It is expected that you’ll need to compile a project before opening it in the editor. The Binary version however, compiles the project on creation.

That does seem counter intuitive to me. If the editor is providing source control support then it should include these standard files/folders. Some developers will be potentially losing work if they are not inclined to check if anything has been missed.

No I’m using a standard binary distribution of the editor and during the generation of the project the C++ source files are compiled, so a fully working dynamic library should be available for the editor to use. If I was to do a Run within Xcode then yet another instance of the editor will appear; this is a normal workflow, I know, however having 2 editors running the same project cannot be right. I personally prefer to not have UE4 running inside Xcode, unless I need to debug my C++ code, as the hot reload works fine and I would rather just have Xcode generating new dynamic libraries to be picked-up by the editor.

Do you receive any type of error messages when you try to open the project immediately? Also, when you say “there is a menu but no windows appear” can you provide a screenshot of what you mean?

I’ll have to get back to you about the error message later when I’m home; it was a crash (dereferencing NULL I think). I’ll try with the screenshot, but there isn’t much to show :slight_smile:

If there is naught to show with a screenshot, can you be specific what type of window you would be expecting to see at this point? As in, the loading splash, the Project Browser, the main editor window, etc.

I would expect to see the normal window. Even selecting the menu Unreal Editor > About Unreal Editor showed nothing at all. Something strange, and I am unsure if it happened in previous versions of not as I am only just back using UE4 again. I have a feeling it didn’t though.

Ah, I understand what you mean now. I’m not extremely familiar with Mac so it didn’t dawn on me immediately what you were talking about with the menu. I forgot that it shows in the Mac menu at the top even without the main window. Have you tried verifying your installation or reinstalling the editor to see if the same problem occurs? Both of these actions can be completed through the Epic Games Launcher.

No I haven’t tried that, however I have no reason to suspect that is the issue. I am about to switch from Mac to Windows for Game Development with UE4 as the iMac hardware just can’t cut it. I will see how it fares with that; however we are now talking about a different issue to the git issue raised in my original bug report.

When it comes to the Github issue, that is currently intended behavior. There are possibilities that it will be changed in the future but as of now, the initial commit will need to be made outside of the editor and any sequential commits can be made with the plugin.

If you continue to have the same problems with the editor not appearing when you change to your new hardware, please post a new question and we’ll be happy to assist you further.

OK that’s cool. I haven’t experienced any of the issues under Windows 10 that I experienced under OSX (El Capitan). Oh well :slight_smile:

Git Source Control Provider plugin will now make the initial commit including Source folder if any as of UE 4.13 since my Pull Requests was recently integrated

Git Source Control Provider plugin will now make the initial commit including Source folder if any as of UE 4.13 since my Pull Requests was recently integrated