Special Thanks to The FrankRatchye STUDIO for Creative Inquiry at Carnegie Mellon University

 

Source Control is amazing because if you mess up your work you can revert to an earlier state. It is a backup.

Before we start, I suggest you have your entire Ue4 project in a folder, i.e. “MyUe4Project<Ue4Project”

If the Ue4 project is closed, you can delete these folders:

  • Binaries
  • Build
  • DerivedDataCache
  • Intermediate
  • Saved
  • As well as a VC.db file (Visual Studio Database file)

We can regenerate this stuff back in two ways:

  • By starting the project. You will see this image, click yes. it should work.

.

  • By right-clicking our Ue4 project and click “regenerate visual studio files’

If you open up your.SLN BEFORE you did the above, and get load failed errors, just regenerate visual studio files by right-clicking the .uproject.

Now, download and install Source Tree.

Then go to file > clone/new.

Click create.

The destination path will be where the folder ABOVE your ue4project is.

Give it a name, and we’ll be using GIT.

Click create, and Source Tree will go to work.

If we have “see hidden files” enabled, we should see a hidden folder called “.git.” This is our version control repository. Source Tree should look like this:

Click the “>” and open up your folder. With the selected, go to actions < ignore

Ignore the intermediate folder, it should be pretty obvious how. Click OK when you’re done.

This will create a “.gitignore” file, you will see it in the unstaged files section. Right-click it and “Show In Explorer”

Select everything, and copy/paste this in:

##########################
# Unreal Generated Files #
##########################
*/Binaries
*/Build
*/DerivedDataCache
*/Intermediate/
*/Saved
*/Content/StarterContent
######################
# VS Generated Files #
######################

*.VC.db
*.suo
*.zip
*.VC.opendb
*.sln
*.ipch

Now you are ready to make your first commit. Click Stage All, and add a comment if you wish and press commit.

For comments, I suggest you write the date and things that you did on this project since the last commit.

That is all folks!