Whenever I set up a GitHub repository for a C++ project, I’m the only one who can open it. I checked the ignore file and made sure the .sln isn’t on it, and the .sln is added to the repository, but it’s empty. When other people clone the repository, they get an error saying modules are missing. They click “yes” to rebuild them, but rebuilding fails. They get another error saying “could not be compiled. try rebuilding manually from source.” They have also tried right-clicking the uproject and generating project files, but that fails too. Am I missing something?
When setting up a GitHub repository for a C++ project in Unreal Engine, there are a few things you need to keep in mind to ensure others can clone and build the project successfully:
Include all necessary files: Make sure all necessary files are included in the repository, such as source code, header files, build files, etc. It’s a good idea to check the Unreal Engine documentation to see what files are required for a C++ project.
Ignore unnecessary files: Make sure unnecessary files are ignored in the repository, such as binary files, cache files, and temporary files. This can be done by adding the necessary patterns to the .gitignore file.
Ensure dependencies are included: Make sure any dependencies used by the project are also included in the repository or specified in a separate dependencies file. This can be done by using a package manager such as Git submodules or Git subtrees.
Check the project configuration: Make sure the project configuration is set up correctly and includes all necessary modules and dependencies. This can be done by checking the Unreal Build Tool (UBT) settings and the project’s build configuration.
Verify the build environment: Make sure the build environment is set up correctly on the other person’s machine and includes all necessary dependencies, such as Visual Studio and the Unreal Engine.
If these steps don’t resolve the issue, it may be a good idea to reach out to the Unreal Engine documentation for additional information.
I’m really sorry, but I didn’t understand any of that, and none of the documentation links you attached say anything about GitHub or repositories. Here is the ignore list:
I don’t have a clue what a single thing on that list is. It’s the list that UE5 generated automatically. The only change is that I removed the .sln file, but when that gets pushed, it’s completely empty
EDIT: I’m also apparently supposed to be able to check out assets, but that option doesn’t appear. Clearly I’ve set this up all wrong, but I’ve been following tutorials and I imagine they don’t have these problems
The ignore list contains various folders, files and wildcards that shall be ignored by the GitHub project. I suggest reading documentation or watching a YouTube tutorial if you wish to setup this.
I know what the ignore list is. I don’t know what the things in the list are. I have looked at documentation and tutorials. Unreal Engine is not exactly known for it’s tremendous documentation. I have followed tutorials to the letter with no success.
The problem stems from the ignore file Unreal generates: it ignores a really important folder called the Binaries folder! So, for anyone who has this problem in the future, Here are the steps to successfully set up a repository:
Create a folder for your repository.
Inside the repository folder, create a new text document. Rename it .gitignore (ignore.conf for Plastic SCM). You may get a warning about changing file extensions. Ignore that warning.
In the GitHub Desktop App, create a new repository. Give it the same name as the repository folder you created earlier, and set its path to the folder the repository folder is inside of.
Publish the repository.
Move the project files into the repository folder.
Commit the changes.
On the GitHub website, go into Settings>Collaborators and add any team members you need.
Each team member will need to accept the invite. Then, on the Desktop app, they will hit File>Clone Repository. They can set whatever local path they want.