# Is there a better way of getting access to release/preview/promoted sources?

**URL:** <https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789>\
**Category:** C++\
**Tags:** unreal-engine, Engine-Source-Code\
**Created:** [January 28, 2015, 11:17am UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789 "2015-01-28T11:17:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0eb047b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0eb047b](https://forums.unrealengine.com/u/anonymous_user_d0eb047b)\
**Post date:** [January 28, 2015, 11:17am UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/1 "2015-01-28T11:17:57Z")

</div>

Hi, Is there a better way to get access to release, preview and promoted branches for reading/searching source files to figure out whats going on?

Not really familiar with git. Is there some cache or mirror setup to save disk space in my situation?

I basically cloned each branch?

[FONT=Courier New] git clone -b release [https://github.com/ngrts/UnrealEngine.git](https://github.com/ngrts/UnrealEngine.git) release  
cd release  
git remote remove origin  
git remote add -t release origin [https://github.com/ngrts/UnrealEngine.git](https://github.com/ngrts/UnrealEngine.git)  
git remote add -t release upstream [https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)  
git pull upstream release  
git push origin release  
cd …  
git clone -b 4.7 [https://github.com/ngrts/UnrealEngine.git](https://github.com/ngrts/UnrealEngine.git) 4.7  
cd 4.7  
git remote remove origin  
git remote add -t 4.7 origin [https://github.com/ngrts/UnrealEngine.git](https://github.com/ngrts/UnrealEngine.git)  
git remote add -t 4.7 upstream [https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)  
git pull upstream 4.7  
git push origin 4.7  
cd …  
git clone -b promoted [https://github.com/ngrts/UnrealEngine.git](https://github.com/ngrts/UnrealEngine.git) promoted  
cd promoted  
git remote remove origin  
git remote add -t promoted origin [https://github.com/ngrts/UnrealEngine.git](https://github.com/ngrts/UnrealEngine.git)  
git remote add -t promoted upstream [https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)  
git pull upstream promoted  
git push origin promoted

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [January 28, 2015, 11:40am UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/2 "2015-01-28T11:40:00Z")

</div>

Hello.

Once you clone git repository you get all the branches of it. To change branch just type this in your local repository:

```auto

git checkout branch_name

```

If you plan to do changes in engine code on your side, it would be better if you go through a simple git guide to understand the basics, since it will involve work with git, if you plan to log your changes.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0eb047b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0eb047b](https://forums.unrealengine.com/u/anonymous_user_d0eb047b)\
**Post date:** [January 28, 2015, 1:26pm UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/3 "2015-01-28T13:26:23Z")

</div>

i dont want to check out the entire repo, im low on disk space on SSD.

> [@BiggestSmile;212387](#):
>
> Hello.
> 
> Once you clone git repository you get all the branches of it. To change branch just type this in your local repository:
> 
> ```auto
> 
> git checkout branch_name
> 
> ```
> 
> If you plan to do changes in engine code on your side, it would be better if you go through a simple git guide to understand the basics, since it will involve work with git, if you plan to log your changes.

I thought what I did above was to clone release, 4.7 and promoted branches only. (the clone -b and remote -t)

Am i missing something? I did read a whole bunch of git command documentation. Are you saying I just cloned the entire UE4 repository three times?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [January 28, 2015, 4:31pm UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/4 "2015-01-28T16:31:24Z")

</div>

Oh, sorry, didn’t actually notice that you were cloning specific branch, my bad.  
You should just clone it once like this: “git clone [https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)” and then just switch branches via git checkout command. There is no need to clone every branch to separate directory.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0eb047b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0eb047b](https://forums.unrealengine.com/u/anonymous_user_d0eb047b)\
**Post date:** [January 29, 2015, 5:12am UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/5 "2015-01-29T05:12:51Z")

</div>

> [@BiggestSmile;212508](#):
>
> Oh, sorry, didn’t actually notice that you were cloning specific branch, my bad.  
> You should just clone it once like this: “git clone [https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)” and then just switch branches via git checkout command. There is no need to clone every branch to separate directory.

Thanks. My mental picture of what Git was doing was wrong. O\_o That’s what you get for rushing.

I DO have three complete copies of the Unreal Engine repository(because of how Git works).

Gonna take me a while to finish but the official?? [Git book](http://git-scm.com/book/en/v2) has been pretty good so far.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [January 29, 2015, 1:25pm UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/6 "2015-01-29T13:25:47Z")

</div>

You could just follow this [http://githowto.com/](http://githowto.com/) short tutorial. Should be pretty much enough.

---

<div class="post-metadata">

**Author:** ![Atticus\_Crandorf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atticus\_Crandorf](https://forums.unrealengine.com/u/Atticus_Crandorf)\
**Post date:** [January 31, 2015, 12:13am UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/7 "2015-01-31T00:13:58Z")

</div>

You may want to look at --single-branch

I use the command below to get only the promoted branch.

git clone -b promoted --single-branch [https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0eb047b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0eb047b](https://forums.unrealengine.com/u/anonymous_user_d0eb047b)\
**Post date:** [February 11, 2015, 7:40pm UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/8 "2015-02-11T19:40:12Z")

</div>

git clone --mirror && git clone --reference --shared | --local]

Yes and no, you dont save any space via --single-branch. I was hoping to save space and bandwidth via reference/shared|local/dissociate,…

So i thought I’d do what Google recommended for building your own AOSP build. Create a local mirror and clone off of that. Of course they’ve wrapped Git up in their own scripts which work great.

I’ve tried to set up a mirror following GitHubs instructions at [GitHub-\>Duplicate a repository](https://help.github.com/articles/duplicating-a-repository/).  
Everything works until the last step to update my GitHub fork: [FONT=Courier New]_git push -v --mirror_

This outright fails with GitHub windows client. Just says cannot spawn git. No useful information. version 1.9.5.github.0  
[FONT=Courier New]$ git push -v --mirror  
Pushing to [https://github.com/ngrts/UnrealEngine](https://github.com/ngrts/UnrealEngine)  
error: cannot spawn git: No such file or directory

I tried Cygwin version of Git. version 2.1.1

It does do something, but a second push again involves a 200+MB push…  
$ git push -v --mirror  
[FONT=Courier New]Pushing to [https://github.com/ngrts/UnrealEngine](https://github.com/ngrts/UnrealEngine)  
Counting objects: 58936, done.  
Delta compression using up to 4 threads.  
Compressing objects: 100% (31369/31369), done.  
POST git-receive-pack (chunked)36)  
Writing objects: 100% (58936/58936), 225.71 MiB | 1.80 MiB/s, done.  
Total 58936 (delta 38770), reused 42295 (delta 26390)  
remote: warning: GH001: Large files detected.  
remote: warning: See [Managing large files - GitHub Docs](http://git.io/iEPt8g) for more information.  
remote: warning: File Engine/Source/ThirdParty/CEF3/cef\_binary\_3.1750.1805\_macosx64/Release/Chromium Embedded Framework.framework/Chromium Embedded Framework is 68.74 MB; this is larger than GitHub’s recommended maximum file size of 50 MB  
To [https://github.com/ngrts/UnrealEngine](https://github.com/ngrts/UnrealEngine)  
= [up to date] 4.0 -\> 4.0  
(snip)  
= [up to date] 4.7.0-preview-6 -\> 4.7.0-preview-6

! [remote rejected] refs/pull/1/head -\> refs/pull/1/head (deny updating a hidden ref)

```
***tons of these deny updating***

```

! [remote rejected] refs/pull/99/merge -\> refs/pull/99/merge (deny updating a hidden ref)

updating local tracking ref ‘refs/heads/4.0’  
(snip)  
updating local tracking ref ‘refs/tags/4.7.0-preview-6’  
error: failed to push some refs to ‘[https://github.com/ngrts/UnrealEngine](https://github.com/ngrts/UnrealEngine)’

I was hoping to get this squared away before doing soft copies of the mirror.

GitHubs response so far was this looks like known issue in older clients and to update to newer version, but GitHub client auto updated just yesterday?

Has anyone else had experience with mirroring EpicGames/UnrealEngine successfully?

Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0eb047b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0eb047b](https://forums.unrealengine.com/u/anonymous_user_d0eb047b)\
**Post date:** [February 12, 2015, 12:02am UTC](https://forums.unrealengine.com/t/is-there-a-better-way-of-getting-access-to-release-preview-promoted-sources/19789/9 "2015-02-12T00:02:03Z")

</div>

GitHub forks, pull requests, mirrors

Changed refspecs to [not include pull requests](http://christoph.ruegg.name/blog/git-howto-mirror-a-github-repository-without-pull-refs.html).

“[FONT=Courier New]git fetch -v -p” and “[FONT=Courier New]git push -v -p --mirror” both work. As do local clones.

[FONT=Courier New]git clone -v --bare   
-c remote.origin.mirror=true   
-c remote.origin.push=“+refs/heads/_:refs/heads/_”   
-c remote.origin.push=“+refs/tags/_:refs/tags/_”   
-c remote.origin.pushurl=“[https://github.com/ngrts/UnrealEngine](https://github.com/ngrts/UnrealEngine)”   
-c remote.origin.fetch=“+refs/heads/_:refs/heads/_”   
-c remote.origin.fetch=“+refs/tags/_:refs/tags/_”   
[https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)   
Mirror\_UnrealEngine

$ cat config  
[core]  
repositoryformatversion = 0  
filemode = true  
bare = true  
ignorecase = true  
[remote “origin”]  
mirror = true  
push = +refs/heads/_:refs/heads/_  
push = +refs/tags/_:refs/tags/_  
pushurl = [https://github.com/ngrts/UnrealEngine](https://github.com/ngrts/UnrealEngine)  
fetch = +refs/heads/_:refs/heads/_  
fetch = +refs/tags/_:refs/tags/_  
url = [https://github.com/EpicGames/UnrealEngine.git](https://github.com/EpicGames/UnrealEngine.git)
