Github and You: Maximizing Your Usage of the new Graphics Repository


As of today, the Fire Emblem Graphics Repository is officially switching from Google Drive to Github. The reasons why are numerous, and explaining all of them would be a big pain. Needless to say, as the ‘owner’ of the Repo and basically the guy who has managed/run it since its inception, I didn’t make this decision lightly.

There’s basically a 0% chance I’ll not do this. So, with that in mind, let’s discuss how, exactly, this change will affect FEU, and how you guys, the end users and contributors alike, will be able to access, download from, and upload to this new repo.


Link to the Github Repo.

Github seems like a daunting website for people who aren’t familiar with code. When I first started using Github, very reluctantly, about a year ago, I was intimidated beyond belief. Github has all sorts of jargon that non-coders will find confusing. What does ‘cloning a repo’ mean? Can you download individual files and folders? If you want to contribute, how will you be able to do so? Do you have to download and install a bunch of crap just to access the repo?

The answers to these questions and more will be answered as we continue. To start, I will divide this tutorial into sections targeting specific ‘types’ of users.

  • Basic users. You just want to download animations, portraits, and other stuff from the repo. You’re not here to mess with a bunch of crap. What’s the least work you can do to get things downloaded so you can get back to fiddling with a project?
  • Advanced Users. You want to download animations and stuff, but you’re willing to go a little further to set up auto-updates for the repo. You value convenience, so installing a few things to make accessing the repo easier for the future is right up your alley.
  • Power Users. You’re one of the more ‘serious modders’ in the community. You’ve made a project or two. You’ve maybe even made some resources. You’re going to be dipping into the repository a lot. You will definitely want to set up auto-updates so you always have the most up-to-date resources.
  • Contributors. You may or may not have a project you’re working on, but you definitely have portraits, maps, battle animations, or other things you want to contribute to the repo. There are plenty of ways you can help out, especially now that we’re switching to Github.

Let’s start with the basics and work our way to more advanced stuff.

image Basic User: How do I download the repo as-is, no hassle?

Quick Tutorial

Easy. Visit the repository’s web-page, click this download button, and then download the repo as a Zip file.

This will download the repo’s current version, no matter what it is. You don’t need a Github account or anything else. It’s that easy. The repo is about 1GB in size, though, so you’ll want decent internet.

image Advanced User: My internet is garbage. How do I just download a specific folder of animations?

If you don’t want to download the entire Repo all at once, try these other options out.

Longer Tutorial

Github, unlike Google Drive, isn’t super nice with downloading individual sections of the Repo. You will need three things.

  1. A Github account. Register one by visiting the sign-up page.
  2. Make sure you’re using a browser that has extension support. This means Google Chrome or Firefox. Others won’t work, unfortunately.
  3. Download the Gitzip browser extension. https://gitzip.org/
    With Gitzip installed, you can go to any random folder or files, then double-click the ‘empty space’ on them to add a checkmark.

    Once you have the folders checked, just click the download button for Gitzip at the bottom right of the screen.

    Note that Github has rate limits. To bypass these, you will need a Github account. When you attempt to download files for the first time, Gitzip will ask you for an authentication key. It’s pretty simple, just follow the instructions and you’ll remove the rate limiter.

image Power Users: How Can I set up the FE Graphics Repo so that it auto-updates on my PC?

This is where we start getting into the more advanced, but also the better-overall user experience. To start, you will need the following:

  1. Set up a Github account. Register one by visiting the sign-up page.
  2. Download and install Github Desktop. https://desktop.github.com/

Sidenote: The Repo (currently) has issues with long filepaths. TL:DR, install it to the root of a drive with a really short name. For example, C:/Github/FE-Repo

Don’t name it “Fire-Emblem-Graphics-Repository”. That name is very long and will likely cause errors.

Setting up the Repo with Github Desktop

This tutorial will teach you how to ‘clone’ the Graphics Repo onto your PC. Doing so will only require you to download the full Repo once. Afterward, you will simply ‘pull’ updates from the main Repo Github once in a while, always keeping yourself up to date.

‘Cloning’ simply means ‘making a copy on your PC.’ To clone the Repo via Github Desktop, perform the following steps.

First, install Github Desktop. Presumably, you will have a Github account. Once you install Github Desktop (Hereafter referred to as ‘GD’) login to your Github account.

Go to File<Options.

Then, just sign-in on the accounts tab.

Simple.

After that, click this section here:

Then click the ‘Add’ button that appears to the right, then click ‘Clone Repository.’

NOTE: If you are on a fresh install of Github Desktop, you’ll see the following screen instead. Just click ‘Clone a Repository from the Internet’ and continue onward.

This window will appear. It will be empty though, because you won’t have any projects cloned.

Navigate to the URL tab via the top buttons. Then, paste this URL in the URL section:
https://github.com/Klokinator/Fire-Emblem-Graphics-Repository.git

(Rename the Repo from Fire-Emblem-Graphics-Repository to FE-Repo, just to save file-length. The repo seems to get errors with long filenames if any file inside exceeds 260 characters. Every letter counts!)

Once cloned, you’re done! Let the repo start downloading files. It will probably take a while, given the repo’s size. After it finishes, just navigate to the folder and you can peruse the pictures and resources at your leisure.

The above tutorial only discusses setting up the repo via Github Desktop. To actually refresh the repo when my team updates and adds new content, follow these steps:

Downloading newly updated Repo content to your PC

This is the Repo’s main page. Below are a few key things you will need to remember.

Fetching Origin will simply ‘pull’ information from the primary repo to your PC. ‘Pushing’ will “send” information to me and the other Repo contributors. For the average user, you only ever need to ‘pull’ or ‘fetch’.

The History tab is where you will see new updates to the Repo. This will be a big advantage for the Github Repo over the Google Drive, going forward. It will be absolutely clear what new portraits, animations, and other such resources have been added between updates.

Here’s an example of a different, more substantial update.

With all this knowledge, you’ll be able to update the repo whenever you want, downloading much smaller amounts of data and stressing the repo’s bandwidth far less. You’ll be able to see all the new stuff added in each update, and you’ll be able to navigate directly to the newly added content, too. (Right click a file in that list and ‘view in explorer’.)

image Contributors: How can I add new content to the repo?

First, follow all the directions from the Power Users section. Get Github Desktop installed. Get the repo cloned onto your PC, and do all that other stuff. Once you finish, read the tutorial below.

How to contribute to the Repo

Alright. So, you have the Repo cloned and sitting on your PC. Now you wanna get jiggy adding, removing, or editing stuff. Here’s how you edit stuff and then pass it up the chain to me so I can integrate it into the repo.

First, edit a file inside the repo. For the record, once downloaded, your Repo should look something like this:

So let’s say you open up Readme.md and just add a line there. This is a text file, so I’ll open it with Notepad++. You can edit any file or folder inside the Repo, I’m just using this as an example.

Before:

After:

Yeah I edited one word. Whatever, doesn’t matter. Save the file, then open Github Desktop.

Above, you’ll see the file or files you edited in the ‘Changes’ tab on the left. Clicking a file will typically show you what got changed. The red line indicates something was removed, while the green means something was added.

So now, you want to send me this updated repo you’ve made. To do so, you first have to ‘commit’ the change to your internal PC build. Go to the bottom left and write a title for your update, followed by an optional (but recommended, especially for big updates) description.

Click the blue Commit to Main button, and the spinning icon will whirl around. This will ONLY commit the changes to your pc. Next, you have to ‘push’ the build to Github itself.

The blue box tells you that you haven’t pushed it to Github yet. Do so. For me, when I push, that’s it. The change is now a part of the repo. For you, that isn’t the case. You need to do one last thing; make a Pull Request.

Click this button, and it will take you to a page where you can send me the Pull Request. At this point, I will have to use another Repo for a totally different project as the example, because I cannot make the pull request for myself. In my case, I’ll use my WIP game, Fire Emblem Tower Defense.

All you do at that point is hit the giant green MAKE PULL REQUEST’ button, then submit it, and you’re done. It should go directly to me. Make sure the repositories at the top show an arrow going FROM yours TO mine.

And that’s it. Congratulations, you’ve become a frigging contributor! You’re awesome!

image Q&A Section

I’m anticipating a bunch of common questions, so here are answers to the ones I expect to see the most.

Wall of text and questions

Klok, why change from Google Drive to Github?
There are a few reasons. The first is simply that Google Drive utterly sucks, and that alone is more than enough reason. It’s slow, clunky, and takes FOREVER to update. More than 24 hours ago, I set 125,000 tiny files to update. As of right now, only 32,000 have uploaded correctly, while 1,800 simply failed.

My internet is lightning fast, but Google Drive crawls. It is agonizingly slow for seemingly no reason.

What are the UPSIDES of switching to Github?

  1. People will be able to contribute much more easily than they can now. You can submit animations and portraits the normal way, by posting them on the forums, or you can use Github itself to ‘push’ content to my team.
  2. People will be able to see new updates to the repo very easily. No more guessing what’s going on.
  3. MUCH faster uploading and downloading for people. Google Drive is simply slowwwwww. Clunky, too. You can’t just download things, you have to wait for google to scan, zip, and offer you that zipped file.
  4. People can access the Repo in a variety of ways they couldn’t before, including much more easily downloading and updating it onto their PC.

What are the DOWNSIDES of switching to Github?

  1. Right now, if you browse an image-heavy directory, such as for Portraits, you can’t just see all the portraits. If you download them to your PC, you can, but not directly on Github itself. Hopefully, we can come up with workarounds for this.
  2. I don’t yet know how people downloading and accessing the repo will affect it on Github’s bandwidth. To say I am worried is a huge understatement. We could crash Github or run out of bandwidth in a single day, for all I know.
  3. It’s a little bit clunky to use at first. It might also be a bit intimidating for new users. I hope this tutorial post alleviates that issue!

Will this switch to Github break the Emblem-Anims site?
YES.

The site will continue to stay up for now, along with the old Repo. However, it will quickly become less useful unless or until Shin returns to switch the site to where it can use Github.

If Shin cannot make Emblem Anims use Github… we’re going to have a serious problem. If anyone else wants to give making a new site a shot, let me know!

Can we go back to Google Drive? I liked Google Drive.

18 Likes

Note that this topic serves as the “Hey Klok, your tutorial sucks and I’m lost on how to use Github; what do?” question section. If there’s anything you don’t understand, ask below and I will amend the tutorials as necessary!

This is not a submission topic for sprites and resources. Use the Original Thread for that, please.

Thanks!

2 Likes

I doubt it. The repo is big, but it’s not that big, and even if it were, we don’t have that many users.

1 Like

Where would I find this option?

Turns out on a fresh install, Github Desktop looks like this:

So just click Clone from Internet and progress with the tutorial from there.

1 Like

Why are there some files missing for the assistive GBA Portrait Creator? There aren’t any files after Scouran

I don’t know what you mean. After Scouran? What is that?

Edit: Did you not see the warning message?

It’s in the full repo, just not on the site itself.

1 Like

I seem to keep running into this issue whenever I try to set up the repo to refresh with new content. Any idea what the issue is?

1 Like

One thing I’ve noticed: If even a single file in the repo exceeds 260 characters in its filename, the repo has errors.

Try installing the repo on the top level of your pc. For example:

c:\Github\FE Repo

And use a short name too, not Fire Emblem Graphics Repository, but just FE Repo. This keeps the filepath as short as possible.

In the future, I’ll be shortening tons of files and folders down to eliminate this issue.

If that doesn’t work, lmk. Other things can cause that error.

3 Likes

Looks like installing the repo on the top level and/or shortening the name did the track. Thanks for the help!

1 Like

So duuuuumb but whatever works.

I’ll defo need to shorten names in the future. That was actually the primary impetus for this transition to github. I kept being unable to put giant folders inside other folders, and Gdrive wouldn’t upload them… yeesh!

2 Likes

the git program that github is based on will choke on filenames longer than 260 characters (in theory counting from the root of the repo, including slashes, but who knows what happens on windows) on windows, so you should probably find a way around that

I’m aware, yeah. Don’t really have an easy way to fix the problem beyond eyeballing really long folder names.

I just got word from Shin… Emblem Anims won’t work with the new Github update, not without a huge amount of work. However, I’ll have something really big to announce on that front here pretty soon anyway, so… just keep your eyes peeled.

In the meantime, I’m debating renaming all of the top-level animation folders to be less weapon-type dependent like they are now. We shall see how that turns out!

I suggested this like a million years ago. Am I a prophet now?

4 Likes

Sadly, I had not yet reached enlightenment. I did not understand Github’s mysterious ways, and so, I knew not how to put your plan into action. Now I do!

1 Like

I keep getting a message that the archive is corrupt and 7Zip refuses to extract it, any ideas on how to help?

You downloaded the entire Repo, and the archive is corrupt? Maybe it got cancelled halfway?

Also welcome back to the forums :slight_smile:

1 Like

So i did the git extension on chrome and followed the directions for the token, where/what do i do from there? I selected the folders id like to have and proceed to download, a small box comes up, says content collected but i cant find that content anywhere…? Sorry for the ignorance in advance!

1 Like

Did you see both of these images? There’s an option at the bottom right of the screen you click to download.

1 Like

I just got home and restarted the browser which seems to have worked to where they show up in my downloads now after selecting the folders i wanted.

1 Like