# How to set up a Git Repository for my server

## Windows

### Buy a server

1. Buy a VPS or dedicated server from [ZAP-Hosting](https://zap-hosting.com/badger), use code `TheWolfBadger-4765` for 20% off

### Install Git Bash

{% embed url="<https://git-scm.com/downloads>" %}

### Login to Git Bash

Coming Soon...

### Initiate Git repository

1. You will want to navigate to the directory where your `resources`folder is located.
2. You will then want to type `git init`&#x20;
3. You will then type `git add .`
4. You will then type `git commit` and enter a message for the commit (maybe `Initial Commit`?)
5. You will now need to create a remote repository to link this local repository up to.

### Create Remote repository

<figure><img src="https://4135746405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3gpAFypb73zWIFfO7w%2Fuploads%2F49plQXsojayzMFY0SQn0%2Fimage.png?alt=media&#x26;token=fd3d4924-9dde-4229-8f41-fa500a5fac3e" alt=""><figcaption></figcaption></figure>

1. You will need have a remote repository initialized on GitHub.

<figure><img src="https://4135746405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3gpAFypb73zWIFfO7w%2Fuploads%2FZJtlXeHp12OKa18RMxtd%2Fimage.png?alt=media&#x26;token=0e15e831-e162-4cb3-b212-490130f74bee" alt=""><figcaption></figcaption></figure>

### Connect to Remote

1. Within your git bash terminal you will run the following as GitHub has instructed you to

```
git remote add origin https://github.com/JaredScar/CollectiveM-Server.git
git branch -M main
git push -u origin main
```

2. This will push the changes in your current local branch to the remote branch

### Using GitHub Desktop

Coming Soon...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.badger.store/fivem-general-help/how-to-set-up-a-git-repository-for-my-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
