# Github

### **Github**

GitHub can be used to host and share files. This allows you to easily share and collaborate on files, track changes using commits, and keep a history of updates. GitHub's hosting capabilities enable you make your content accessible on the web.

### **Prerequisites**

Create an account on [Github](https://github.com/). Users might also be asked to provide details and billing addresses that are outside of this tutorial's scope.

**Step 1 - Create a new repository on GitHub or navigate to an existing repository where you want to host your files.**

<figure><img src="/files/0gdPYE5T5OhPfLhl3pRk" alt=""><figcaption><p>Create new repository</p></figcaption></figure>

Fill in the repository details. **Make sure your Repo is public.**

<figure><img src="/files/INz5BkZXY29AJ6yDfo2e" alt=""><figcaption><p>Make the repository public</p></figcaption></figure>

### Host Your File

**Step 2 - Upload a file**

Go to your repo in Github and above the list of files, select the Add file dropdown menu and click Upload files. Alternatively, you can use version control to push your file to the repo.

<figure><img src="/files/E00gEDGUR9NrVSGM80pw" alt=""><figcaption><p>Upload file on Github</p></figcaption></figure>

To select the files you want to upload, drag and drop the file or folder, or click 'choose your files'.

<figure><img src="/files/0DTcAxZKkO65lItHeII4" alt=""><figcaption><p>Drag and drop new files on your GitHub repo</p></figcaption></figure>

In the "Commit message" field, type a short, meaningful commit message that describes the change you made.

<figure><img src="/files/CVCtvg56yOHi2eMo7yl1" alt=""><figcaption><p>Commit changes</p></figcaption></figure>

Below the commit message field, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default branch, then you should choose to create a new branch for your commit and then create a pull request.

After you make your commit (and merge your pull request, if applicable), then click on the file.

<figure><img src="/files/hqnaEjLe04qt1zW1Ydpp" alt=""><figcaption><p>Upload successful</p></figcaption></figure>

**Step 3 - Get the RAW version of your file**

To use your file on the Market **you need to use the raw url of the asset**. Also, make sure your Repo is publicly accessible to allow the market to use that file.

Open the File and click on the "Raw" button on the right side of the page.

<figure><img src="/files/usVuJqHYySE3i4UdBGF2" alt=""><figcaption><p>Click the Raw button</p></figcaption></figure>

Copy the link in your browser's URL - it should begin with "<https://raw.githubusercontent.com/>...." like in the image below.

<figure><img src="/files/CnNRhputsHgeNXCfaCFz" alt=""><figcaption><p>Grab the RAW github URL from your browser's URL bar</p></figcaption></figure>

<figure><img src="/files/NKVAzXkM7y3KupNjy67m" alt=""><figcaption><p>Copy paste the raw url</p></figcaption></figure>

**Step 4 - Publish the asset using the Raw link**

Now, copy and paste the Raw Github URL into the File field of the Access page in the Ocean Market.

<figure><img src="/files/L7N3dRDHtVJhdG9KEj5s" alt=""><figcaption><p>Upload on the Ocean Market</p></figcaption></figure>

Et voilà! You have now successfully hosted your asset on Github and properly linked it on the Ocean Market.


---

# 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.oceanprotocol.com/user-guides/asset-hosting/github.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.
