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.

Then we need to setting at our local files.

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
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.