x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

What is the process for getting updates from GitHub?

A bit of a newbie question here, not much a programmer and I was wondering how the updating process goes.

When new source code is released do we just download it into a new fork/repository from Github and then rebuild that with the required dependencies? Or do the required dependencies get updated as well and updating will require starting from square 1?

And can we over-write older versions of the source code repositories (that we haven't made changes to), so we don't have needless clutter?

I checked the FAQ but couldn't see anything about an updating process. Will updating UE4 while working on a bigger project still maintain it, for safety I don't think I would update from a working version on a major project but just in case there's a vital bug fix it might be worth it.

Thanks.

Product Version: Not Selected
Tags:
more ▼

asked Mar 25 '14 at 04:22 PM in Installation & Setup

avatar image

Axi5
43 5 5 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The update process will be different depending on how you acquired the UnrealEngine repository.

Direct clone

If you cloned directly from EpicGames/UnrealEngine, you can simply update by pulling the latest commits:

git pull

And then checking out the version tag you're interested in:

git checkout 4.1

Fork

If you forked, you will have a remote branch named origin which points to the version of your repository as it currently exists on the GitHub servers. Note, however, that your fork is disconnected from Epic's version of the repository -- we need to remedy that.

If you have not already done so, define a new remote branch pointing to Epic's UnrealEngine repo:

git remote add upstream https://github.com/EpicGames/UnrealEngine.git

Now fetch the most up-to-date data from the upstream branch:

git fetch upstream

Once that completes, you're ready to merge in whichever version of the upstream branch that you want. To merge in the latest version 4.1 changes:

git merge upstream/4.1

If any conflicts were encountered while merging, resolve them:

git mergetool

You then need to commit the new changes:

git commit -m "Updated to version 4.1"

For more on working with forks, please refer to GitHub's documentation: https://help.github.com/articles/fork-a-repo

Required binaries

Required dependencies do not get updated automatically when you pull the latest changes from GitHub. It is likely that these zip files will change between releases, so you will need to manually download the latest versions and re-extract them into your local workspace.

You may safely overwrite old source repos, but in practice you shouldn't have to. When you pull the latest changes from GitHub, all local source code will be updated to the most recent version. The simplest workflow is to work from a single repo clone and do all updating in-place. You shouldn't need to generate multiple copies of your cloned repos unless you have a compelling reason to do so.

Given the manual nature of required binary zip files, you may accumulate some clutter in folders not governed by the repository (such as those created during zip file extraction), but it shouldn't be a major concern. We are hoping to improve this part of the process in the future.

more ▼

answered Mar 31 '14 at 08:11 PM

avatar image Snipe3000 Apr 24 '14 at 10:33 PM

Incorrect, this does not work. Trying to update from 4.0.2 to 4.1, it tells me I'm already up to date.

avatar image Ben Donatelli Apr 25 '14 at 05:48 PM

Updated my answer with better instructions.

avatar image Furinyx Jul 18 '14 at 05:20 AM

I used "git merge upstream/4.3" for the latest 4.3 version but got the following:

 error: The following untracked working tree files would be overwritten by merge:

which listed some third party files and aborted the merge so I can't use "git mergetool" as the merge has already aborted; how should I go about safely merging the files without it aborting?

avatar image Jezcentral Jul 18 '14 at 08:35 AM

Furinyx, if they are third party files, are you sure you want to add them to the repository? You could always add them to the .gitignore file which would bypass the problem.

avatar image Furinyx Jul 19 '14 at 01:38 AM

Third Party was already on .gitignore but I'm guessing I needed more explicit ignores in place to bypass it, I will make sure to try that next time. I detailed what I did this time in reply to robbie below.

avatar image robbiecooper Jul 18 '14 at 06:42 AM

I'm voting this up because its a very important topic and its probably worth getting more documentation on it. I've been using the fork/ fetch upstream method and was having problems. I just deleted UE4 from my hard drive and recloned 4.3- there's now several gigs worth less data in the UnrealEngine folder than there was before. Methinks cloning straight from Epic may be less troublesome...

avatar image Furinyx Jul 18 '14 at 09:18 AM

I re-forked for going from 4.0 to 4.1 and 4.1 to 4.2 but I am now planning to do serious projects with UE4 and want to be able to make engine changes with source control so just using cloning from Epic isn't an option.

Luckily I haven't changed anything yet so I deleted the local repository, re-cloned 4.2 freshly without dependencies and merged with upstream/4.3 which has conflicts as expected; however, when I use "git mergetool" it constantly comes up with "merge failed" and then "Continue merging other unresolved paths ?" and does not merge correctly, leaving conflicts, so I have had to go with re-forking once again to get 4.3 properly.

Hopefully this issue is addressed before 4.4 is out; I'm surprised the correct method isn't documented on the Unreal Engine Github page.

avatar image Skie Aug 11 '15 at 03:29 AM

Isn't it better to make a new branch from the 'promoted' branch and use that as the main branch to work from and not the 4.X?

I also read that it's best to fetch and then merge rather than just pull because that process should be done locally especially if it would be a large pull. Pull does both fetch and merge but right away as it's being sucked in or right after and you don't have any control over it.

So on 'local' and 'origin' there would be 'promoted' and 'MYpromoted' branches. Checkout local 'promoted', fetch from upstream (EpicGames) for 'promoted' and merge to local 'promoted' then merge that with local 'MYpromoted' then push to origin (GitHub). Get that all in sync with no commits needed and then build because the build does lots of stuff. Just after build resync everything again. I think this is the cause of many of the git merging problems. It would be cool if a pro could comment on this and suggest some tips.

I also highly recommend SourceTree rather than just the terminal or GitHubs' Windows app. It's far better to understand what is going on and how to do things and things that can't be done with the app it has a terminal ready to use for all the crazy git commands.

avatar image Alex.Nolasco Nov 17 '15 at 04:18 AM

This worked great except that my upstream had to be set to git@github.com:EpicGames/UnrealEngine.git

this avoided git from having to prompt for a password.

avatar image t0b4cc0 Feb 16 '17 at 06:17 PM

I think once u setup a user for git it works just fine with the github safe links

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question