# Unity och git

Unityprojekt fungerar egentligen precis som vanliga C#projekt. Öppnas de i Visual Studio Code kan man alltså använda [samma steg](https://csharp.progdocs.se/mjukvara/git-and-github).

**En gång:**

* Ha Visual Studio Code installerat.
* Ha [Git installerat](https://csharp.progdocs.se/mjukvara/git-and-github).
* Ställ in [användarnamn och e-mail](https://csharp.progdocs.se/mjukvara/git-and-github#foersta-gangen-efter-ny-git-installation).
* Lägg in tillägget [gitignore ](https://marketplace.visualstudio.com/items?itemName=codezombiech.gitignore)till Visual Studio.

**En gång per projekt:**

* Gå till projektet i Visual Studio Code, öppna kommando-palletten (F1 eller Fn+F1) och sök "add gitignore". Välj "Unity".
* Gå till Source Control och välj Initialize Repository.
* Publicera projektet på Github.

**En gång per arbetstillfälle:**

* Gå till projektet i Visual Studio Code.
* Gå till Source Control.
* Skriv något i rutan för Message.
* Tryck på plusset till höger om "Changes" för att lägga till alla nya ändringar till din commit.
* Tryck på Commit, och sedan Sync.

**För projekt med stora filer (>100mb)**

* Gå till projektet i Visual Studio Code.
* Gå till terminalen
* Skriv in kommandot `git lfs install` för att aktivera Git LFS (Large File System)
* Skriv därefter in `git lfs track '*.fbx'` för att göra så att LFS sköter alla FBX-filer. Gör motsvarande för andra stora filtyper.


---

# 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://unity.progdocs.se/unity-och-git.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.
