Version Control with Git in Unity

  • First, visit this site https://git-scm.com/downloads & download the appropriate version according to your OS.
  • Let the default ticks be unchanged, install it by clicking next till the end.
  • After successful installation, you should be able to open the git bash tool which seems like a command-line interface.
  • There are two basic commands ls and cd that you would have to use at the doorstep. ls lists out all directories on your desktop and cd allows you to change directories. (Tip: When you type a few initials and press the tab key, the autocomplete function will get the full name of the folder.)
  • The other way to directly run bash is to go into the folder where you have stored your unity project and right-click to see “get bash here” option. This would get you going instantly with the main work.
  • Go to https://github.com/ and sign up.
  • Now, click on the “start a project” option after you have logged into your new account.
  • Now, you shall see the following page where you have to enter just a few details.
  • Now, you should have landed on the project page. Let it be open and shift to your local system to start git bash where your project is located.
  • Now, write command git init. (This is to initialize the repo.)
  • Now, write command git remote add origin <URL>. (The URL shall be available in your Github repo.)
  • Done. Now you should be able to work further with version control commands like -v (to check version), pull, add, commit, push, etc.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store