Skip to content

Using Git

kenner2 edited this page Dec 22, 2025 · 2 revisions

Setup Git


Important: Make sure Git is installed and accessible from your path. Even if you use a third-party UI like TortoiseGit, you should install Git SCM from the link so that git commands are available to the command prompt. Several of our build scripts make use of git commands in order to properly sync submodules for you.

To test this is working, open a terminal application (cmd, Powershell, or Terminal) and type the following:

git version

You should get an output that looks something like this:

PS> git version
git version 2.50.0.windows.1

If you get an output that says something along the lines of:

PS> git version
git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

Then git is either not installed or not added to your system PATH variable. Either reinstall Git via the recommended link or add the Git\cmd folder to the PATH yourself. Note that Windows terminals cache the PATH variable; If your terminal window was opened before installing Git or adding it to the PATH then you should close that terminal and open a new one before testing.

Optional: install a Git UI program if you're unfamiliar/uncomfortable with git command line. We'd recommend TortoiseGit and will add tutorials for it.


Fork/Clone Repository


All changes made should be done in a forked repository. To fork a copy of the main repository:

  1. Go to the KnightOnline repo
  2. Click the Fork button:
    image
  3. Make sure your user is selected as the Owner. All other defaults should be fine. Click "Create fork":
    image
  4. You should be redirected to your newly created personal fork. Take note of the url in your address bar; It should be the KnightOnline project under your user name.

We can clone our fork now that it's created. Click the green "Code" button and make sure the Local tab is selected. Using HTTPS (or SSH if you set it up), click the copy icon for the KnightOnline.git URL:
image

Use the link to clone the repository, using either:

Git command line:

git clone <paste your url here>

This will create a new folder named KnightOnline in the directory where the command was run.

TortoiseGit:

  1. Right click in the directory where you want to download the project and select Git Clone... from your context menu:
    image
  2. Paste the repository url you copied from the green "Code" button into the URL box. Click OK:
    image
  3. Tortoise will clone the repository to a folder named KnightOnline
    image

Clone this wiki locally