Get privy to Git

If you haven't heard, our UEStudio users have a great new feature on the way that I'm personally very excited about – our brand new Git integration is coming soon, and we're currently inviting interested users to join the Beta.

For our friends who aren't familiar with Git, this blog post is for you. It's been my trusty sidekick ever since someone first showed me how it works in the real world. And it's not just for people who code. Using Git, you can manage different versions of any files, and manage large scale collaboration with others.

Major news organizations use Git to manage data and style guides. Designers collaborate on and share fonts, and and directories full of images. Writers share their work and get feedback – the potential really is unlimited.

Now, if you checked out any of those links, you landed on GitHub. I should make it clear that GitHub is not the same thing as Git. Git is the versioning software we use to manage files and versions thereof. GitHub is a large Web application that facilitates easy discovery of and contribution to various repositories, whether it is code, prose or otherwise. We use Git on our computers, and can use it to talk to GitHub to share our code with others for free. We don't HAVE to do that, and GitHub has competitors who provide the same functionality. You can maintain your own personal Git repositories just for the sake of having versions of your files that you can hop back and forth between on the fly. It's up to you how you use it.

Ok. Cool. But how does it work?

Like someone once did for me, I'll animate all this with a real world example. At IDM's new GitHub page, you can see we've got two public repositories that are open to all: wordfiles and themes. I put these up there to make them easy for our awesome community of users to edit and add new files for all to enjoy. Let's dive into how all this works.

Let's start with a brief backstory. As you may know, we've got a lot of wordfiles. We've got syntax highlighting for everything from Fortran to drum tablature. It's become rather unruly, so it made sense to manage it with Git, and host it on GitHub to make it easy for anyone to contribute to if they're comfortable with doing so.

So it's been decided that we'd like to manage this with Git. Time to take the steps to initialize the wordfiles directory as a repo that Git will track, then push it up to GitHub. All of these commands can be done from the Git Shell in the UEStudio beta, but we're still adding some of these features to the UI. If you don't see a way to run a Git command from the UI, try the Git Shell. Right click at the top of your repo in the Workspace Manager and click to Launch Shell. In the shell, 'git' is assumed. If using the UEStudio shell, you can leave the prepended 'git' off of the command I've written here.

Anyway, let's get to the steps. If you've got a folder of your own you'd like to put up on GitHub, here's how to get started:

git init

This command initializes the repository by creating the .git folder at the very top of your new repo. Beginning with a dot, it's hidden on most interfaces, so it stays out of the way. This is where all of the information about your repository lives. With the UEStudio Beta, you can do this on any folder by right clicking it, hovering over the Git submenu and choosing to create/initialize a repo.

git add .

There are a few variations of this command, but this one gets the job done when you're starting anew. This simply tells Git that you want it to track all of the files in this directory, including its children. Adding a new file later is similar: git add path/to/file/filename.jpg

git commit -m 'initial commit'

The official explanation of a commit is that it's how you 'record changes to the repository.' I've added a bunch of files, and am now recording that action, along with a message (that's what the -m sets off) noting that this is the initial commit. You can see when you visit our wordfiles repo that there are a ton of files that haven't been changed since I did this. And that's exactly how it'll stay until the files need to be changed!

Meanwhile, on GitHub...

Creating a new repository on GitHub is a simple button press. There's a plus sign near your username and profile image where you can create and name the repo. Give it a name and save it with the default settings. Once created, GitHub gives you a simple guide to getting started. In our case, we're going to add an existing repo from the command line. Let's assume the repo I've created is called 'test.' Here are the two commands GitHub will give me to run.

git remote add origin

git push -u origin master

Once Git is done doing its business on our end, we can visit our repo on GitHub and see that our files are all there.

What now?

When someone wants to add a new wordfile to, they first need to get a copy of this repository. GitHub has a great guide on contributing that's worth a look if you're interested in taking this for a spin.

If you're new to command line interfaces (hopefully you're still with me!), the idea of using these commands can be scary. This is why we're bringing the power of Git to UEStudio. We're making sure you'll be able to do all you need to do from UEStudio's user interface without taking away the added power of the command line.

If you've yet to, I encourage you to take Git for a spin. If you manage a lot of files, especially in a team environment, I think you'll really learn to love it. Happy versioning!

Back to Top