InEditor Git repo to Bitbucket

I’m either really stupid or really blind. I’ve read all the documentation 3 times, and read a bunch of answers here, but I still can’t figure out one thing: Where is the repo that UE4 commits to?

And by that I mean that I made a Test project and committed a single file. I can’t see it in the .git folder inside the project. All I see is “Info Commited [master (root-commit) b0ff519] Test.” such and suck, with every commit giving a different value such as the next one being “Info Commited [master ad45f0d] ghj.”.

Forgive me if this is a very stupid question but I haven’t used git cmd before, so I don’t know what these numbers/letters represent. My point is however that I can’t see them in the local repo (unless the local repo is not .git folder).

The main reason I’m asking this question is because I’d like to forego SourceTree and just use UE4 to deal with commits/diff’s and all that. Basically I’d like UE4 to sync to Bitbucket, as it stands I have no clue how to define a repo server.

If you’ve ever done something like this, I’d appreciate it very much if you gave me a few tips on the matter. Thanks.

Hi Kensei,

I’ll try to clarify how the Git plugin works in the Editor. When you initialize a project as a Git repository, the Editor creates a hidden .git folder for the project and (optionally) a .gitignore file. Git uses this folder to keep track of changes that have been made to the repository locally. The key here is the word “locally.” The Git plugin in the Editor does not connect to any non-local repositories, such as on GitHub or BitBucket. If you wish to keep a non-local repository synced to your local repository (which is certainly a good idea), you will still need to use another program, such as the GitHub Desktop client or SourceTree.

When you make changes to a local repository, by adding, changing, or deleting files, the files themselves are added to, changed in, or deleted from the repository itself. They do not appear inside the .git folder. The only files in the .git folder are data files used by Git to track changes to the repository. You probably will be unable to open most of the files in this folder.

With regards to the commit messages you are seeing, the first part shows you the branch the commit was put in ([master ad45f0d]. The second part is the first 7 characters of the hash for the commit ([master ad45f0d]). The hash is a unique character string that identifies each commit. The full hash is approximately 40 characters long. I know that GitHub uses the hash values to identify commits. I am not familiar with BitBucket, but I believe they use hashes in much the same way.

Oh I see. Thanks for the detailed reply. I was under the wrong impression that the editor plugin could connect to another server and push the repo there. It doesn’t seem like the plugin gives me choice asking on which branch to commit, so I suspect it’s done via cmd. Thanks for letting me know about SourceTree, I suppose it will detect the commits from UE4’s plugin and automatically update the diff to the online repo.

At any rate, thanks again for your time, you’ve saved me a lot of hassle.

Sorry, I just realized that I had glossed over working with different branches in the Editor. The Editor will check any changes that you make into whichever branch of the repository was last checked out in your Git client (GitHub Desktop, SourceTree, etc).

For example, if I create a new branch named “Working” in my GitHub Desktop client (which automatically checks out the new branch), then close the Git client, any subsequent changes that I make in the project will be applied to the Working branch. When I am done working in the Editor, I can then re-open the GitHub Desktop client and verify all of the commits are present, sync those changes to the non-local copy of the repo, and/or merge the Working branch back into the Master branch.

If you want to switch which branch you are committing changes into, then you would need to open your Git client and checkout the new branch that you want to work in. This can certainly be done by using the cmd prompt, but both SourceTree and GitHub Desktop provide useful graphical interfaces to work with your repository. I have not actually used SourceTree though, so all I have to go on there is descriptions from their webpage. However, I can say that the GitHub Desktop client is much improved over the previous GitHub Windows/Mac client. Unfortunately the GitHub Desktop client seems to be limited to only working with GitHub (there may be ways around this, but I have not experimented with this), whereas SourceTree appears to work with Bitbucket, GitHub, and a few other options.

Here are some links that may provide you with some additional information:

Dude, you’re awesome. Thanks again, very useful :slight_smile: