[4.7 Preview 5] Git doesn't work with existing repository

Having started a small project using 4.7 preview 4 under Windows, I saved the project to a git repo on bitbucket.org. I then cloned the project under OS X and opened the project, without issue, under 4.7 preview 5.

I then tried to add the project to git within the Unreal Editor, however it claims the project is not within a git repo:

This is the .git/config file for the git repo, if that helps:

28837-screen+shot+2015-02-03+at+18.24.30.png

Could you execute the following command in your shell?

git status

Certainly:

typhon:Xxxxxx andy$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   Config/DefaultEngine.ini
	modified:   Config/DefaultGame.ini
	modified:   Content/FirstPersonBP/Maps/FirstPersonExampleMap.umap

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	Docs/

no changes added to commit (use "git add" and/or "git commit -a")

Wow, and the clone is a clean one I guess. If you backup your changes and then try to reset the whole repo with:

git checkout .

Well rather than losing changes, I have committed the modified files and added the Docs directory and retried and it made no difference (same error message). It seems to me that the git plugin is looking in the wrong place and it’s claim that .../ProjectDir/.git is not a git repository is probably correct (it should be dealing with .../ProjectDir and not the .git directory I guess?).

Might be a bug in the plugin, can you debug it in a source build?

Hey trojanfoe-

There are a few questions I’d like to ask to help me investigate this issue. Are you still experiencing this problem with preview 6? If you create a project in 4.6.1 are you able to save/open in 4.7 preview and add it to git? Also, have you tried debugging in a source build as Moss suggested? Let us know if you’re still having problems with this along with any other information you can think of.

Cheers

Doug Wilson

Hi Doug, I’m sorry but I am no longer subscribing to UE4 so I’m unable to even install preview 6.

Hey trojanfoe-

There have been a number of issues regarding project conversions to preview 5, many of which were addressed and fixed for preview 6 with more fixed to come for the final release of 4.7. If you still have a copy of your project from an earlier engine version the best option would be to continue working there as the preview versions will continue to be less stable than the final version. You can resubscribe once 4.7 is released and decide if your project can take advantage of any of the bug fixes / new features.

Cheers

The problem is in fact that my Git Plugin could not work correctly under OSX with UE4.7 (up to 4.7.3).

There was a bug in the Unreal Engine regarding the Mac Platform that I fixed a week ago :
https://github.com/EpicGames/UnrealEngine/pull/920

That fix was merged onto master on commit 2196a60

(duplicate of Trouble setting up BitBucket Source Control [4.7.1] - Programming & Scripting - Unreal Engine Forums and [4.7.2] Problem activating GIT support (bitbucket) - Programming & Scripting - Unreal Engine Forums)

Please see my answer bellow, it was in fact a bug int the Mac Platform.
Cheers!