Unity and GitHub

Hi Everyone!
I just finished making my first Unity 3D game, and I want to upload it to a repository using GitHub. However I have never worked with GitHub before and I don’t really understand how to do this. I already finished my unity project, but all tutorials show examples where they start a new unity project, so I’m completely lost here. Please help!!!

Hi @tatumvt ,

So git is its own thing and takes a bit of time to learn, but Github has really good startup guides. You can look for visual client applications (which can be easier for those who aren’t familiar with command-line tools), but I always advise folks to learn some command line basics, since it gets you acquainted with the theory of git, and ends up being a nice skill to have in jobs across the gaming industry and beyond.

Here’s the basic outline of what you need to do:

  • Follow the Github instructions for getting set up with an account.
  • Ensure you set up an SSH key.
  • Create a repo (i.e., a repository) for your project.
  • Pull the repo (git pull)
  • You’ll now have a directory on your computer where the repo was downloaded. Add a Unity .gitignore file to your repo.
  • Move your project into the repo.
  • git add the files (this is sometimes called ‘staging’)
  • git commit the files.
  • git log to see that the commit was successful. (You can also git status for extra confirmation.)
  • git push to upload the repo to Github.
  • Go to Github and confirm that the files were uploaded.
  • Pour yourself a drink! You have a new skill!
1 Like

I am already quite skilled in step 12 though.

1 Like