How to Git in Unity- part 2

If you haven’t set the Git yet, you can read the previous article at Here:
How to Git in Unity- part 1

Now we will jump through the Unity project setting section, assume that the project is already exist for doing version control.

First, we need to add repository on github.com.

  1. Open github.com and log in your account, then open the repositories page.
  2. Press New to create a new repository.
  1. Name your repo as your project, select Public.
    Click Add .gitignore and select( or search) Unity.
  2. Press create repository.

Then we need to setting at our local files.

  1. Go to the project folder and right click, choose Git Bash Here.

2. We need to initialize our git first by input:
git init

However, this might cause some issue with namespace due to the difference of default setting from Git Bash(master) to Github(main).
My way to solve this issue is to create another branch name “main”, and delete “master” at local after push all the updates.
This part will update in the next article.

3. Then we need to add a remote to our repository that we just created on Github.com.
Go to your repo page and click the Code button, then copy the link.

Copy this

Back to Git Bash, input:
git remote add origin <paste your link>

You can input:
git remote -v
to verification. Then you should see 2 link, one with fetch and one with push.

4. Now we can start to push updates and commit.

Next: How to Git in Unity- part 3

--

--

--

A passionate gamer whose goal is to work in video game development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

7 Cisco Webex Teams Hacks to Make Your Team More Efficient

7 Cisco Webex Teams Hacks to Make Your Team More Efficient

SQL Injection — Introduction with Ballerina

Server Sided GraphQL with Apollo Client

What are the elements affect a developer’s job satisfaction

Measuring the carbon footprint of your Python applications

My EC2 Instance Was Breached. Now What?

Which to choose: CANCEL/OK, OK/CANCEL OR YES/NO?

Best Free Platforms To Learn Programming in 2021

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
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.

More from Medium

Custom Dynamic Ambient Systems

Creating a Simple Cooldown System in Unity Using Time.time

Damage VFX using Animated Sprites in Unity

Unity C#: Static