How Git Can Get You In The Game!

Christopher Pearl
4 min readApr 28, 2021

--

I will be the first to say: “I didn’t know how amazing of a tool Github truly is!” Github is a beautiful development tool that allows you to organize files and internet host for software development, and manage your source code. While I’ve been developing for a blink of time on the planet, I’m still discovering the interesting super power of organization that Git can give you over your projects. Whether you want to build an delivery app, create a zombie shooter in unity with you best friend, or just simple record your coding journey and share it with the community or programmers, Git is the place for you!

The simplest way to move from one folder to the next by using the letters ‘cd’ which stand for ‘change directory’. Above is an example of how I navigate to my Unity project inside of the Github command line. I used the ‘ls’ command to ‘list’ out all the files within my Unity folder. If I wanted to find and view the files on my Desktop, I would put “Desktop” in quotes after typing cd, and voila! I am now in my Desktop folder. Quotes need to be put around the name of the folder you want to travel to within Git, due to Git not being able to detect space.

Now that I’ve got a little of the basics down for git, I went ahead and created a repository for my project. Repositories link your project files to the Github web server, so you can back up and/or share your work with other developers. I added my repository name (which is usually your project name) in the picture above and set it to Public. Whether you choose to make your code public or private is a personal choice.

Adding repository to Github project

Next, you’ll need to add your github url to your github command line. Simply copying the url provided on your Github repository. Then, in your git command line window, type “git remote add origin”, and paste your URL. Hit Enter, and voila! Your origin has been added to your server.

Git Help List

Knowing the key words will unlock the castle of power in Github! Typing in git — — help will show you the list of common commands used in the git hub command line. Let’s pin point a few of the most important ones when it comes to you Unity projects.

When using Github, you have to pay attention to both the project code and what is happening on the server. If you follow these 3 steps in this order, you’ll always been in good hands when using your Github server! The 3 steps are: 1. Pull, 2. Commit, 3. Push. Taking and adding to your Github server in this order will keep you away from merge conflicts.

Creating a Commit is what gets all the code and assets you just created for your project together and put into your server. To create a commit, type “git commit -m “______”. Within the quotes, you will type for folder name (aka where your data is located). Press Enter, and you have just finished creating a Commit.

Branching represents the different development work environments you have within your server. The good ol’ saying for working within Github is “Branch early and branch often!” This will ensure you’re keeping all of your code organized between you and your fellow programmers, especially if your working on one section of a Unity project like animations and your co worker is working on the UI.

To push everything to github.com, within the get command line, type “git push origin master”.

There are quite a few tools that can be used within Github. With time, you’ll get to be a master at using Git.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Christopher Pearl
Christopher Pearl

Written by Christopher Pearl

Unity/Unreal Developer, Artificial Intelligence Specialist, AR/VR Developer

No responses yet