UE4 says i haven't installed git? source control

So, i am setting up source control and this error message pops up. What do i do? I have already installed GitHub desktop and set up a repository. Please help me if you can.

In order to use the Git plugin for source control you need to install this Git client:

https://git-scm.com/downloads

Here’s the wiki guide for setting it all up:

Hope that helps!

the plugin seems to be already added, but its still not working. Any way to fix it?

Did you install the Git client I mentioned (first link above)? The Github for windows app won’t work, it needs that other client.

yes I installed git, but i can’t find where it installed to.

It doesn’t tell me where it uploaded to, and I try spotlight search, but it doesn’t show up there either.

Here’s what mine says:

C:\Program Files\Git\bin\git.exe

Put that into the path textbox and try again. Hopefully that works!

EDIT: Oh wait, are you on a mac?

Are you on windows or mac? Because that doesn’t work.

Yep, I am on a mac. Do you think you can still help?

Looking it up, it appears to install to:

/usr/local/git/bin/git.exe

Either that or:

/usr/bin/git/bin/git.exe

I am not positive about the extension used on a mac, probably not an exe file. Do you know the executable extension for a Mac? If so replace the exe in the filepath with the proper extension.

I’ll keep looking to see if I can find the extension type needed.

Thanks a bunch! I’ll take a look

ok, so this is REALLY weird. I’ve checked terminal and it says git is already running at the latest version. So why isn’t unreal engine finding it, and why can’t i find it?

Alright, couple more things to try. Check these folders:

/Applications/Xcode.app/Contents/Developer/usr/bin/

/etc/paths.d/git

/etc/manpaths.d/git

Try typing:

which git

or

find / -name git

or

echo $PATH | sed “s/:confused: /g” | xargs -L 1 ls | grep git

Into terminal, that should find the executable, hopefully at least! :slight_smile:

FOUND IT!

So what should i do with what i have now?

Enter the path to where you found it, including “/git” at the end (if that git file you have highlighted has a file extension, make sure to add that to the end too) into the field in UE4 for the Git Patth

I am crying tears of joy, It Worked! :0

so now, do i just share the GitHub link to the repository with the developers?

Hooray!!! It worked!! haha I was beginning to lose hope, that’s awesome though! :smiley:

Yes, so long as they also have git installed of course. If you are wanting to merge code changes between developers, they should each fork the repository on Github to their own accounts, then download. Have them open the project on their PC, setup git just like we did here, and they will be pushing/pulling to/from their fork. Then use pull requests on Github to merge in the code as you see fit.

Does that answer your question?

um, thats a bit complicated. what does fork mean? and also, they download the project i added, they then go through the same process that i went through? How do you use pull requests to merge the code?

Thank you so much for your help :slight_smile:

In order to prevent errors when merging, each of your developers should have their own copy of the project “forked” into their account. You create a fork by going to your repository (which is the master repository) on their pc using their Gihub account, and then clicking the “Fork” button at the top right of the page.

A fork is a “local” copy of your repository that can be out of sync with the master repository, either ahead or behind, where each developer creates and tests new code. Once that code is ready to be added to the project, that developer would navigate to the master repository and click the “Create pull request” button. From there the developer should select their repo to compare against, check that there are no conflicts, and then submit the pull request (think of it as “merge request”, it only contains changed files). Once submitted other developers can comment on it, make further changes, or just accept the request which will merge the changes into the master repo.

Now every other developer will be 1 commit behind the master repo, in order to fix that each developer should go to their own repo and create a pull request, this time working in reverse, which will merge the changes in the master repo back to their own repo.

Here’s a couple articles on the Github site that has some good info:

https://help.github.com/articles/about-pull-requests/

I would recommend creating an organization in Github for your master repo, here’s some info on that:

Organizations can have multiple users in them, this would allow multiple users to accept pull requests, create/edit/remove Issues, etc.

If you are unsure about any of this, create a small repository with nothing but text files and practice pulling changes you make in one repo, then accepting in the other.

Hope that helps!