# Getting Started with Git

## Installing Git

You will need to [install Git on your local machine](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

## Configuring Git

{% hint style="info" %}
This guide assumes that you are using Git Bash (for Windows) or the terminal (for macOS and Linux), as we will be using Bash commands.\
\
If you are facing issues running certain commands (especially on Windows), please consider using Git Bash instead.
{% endhint %}

To ensure that Git installed correctly, run the following command:

```sh
git version
```

You should see a line of output like this:

```
git version 2.54.0
```

Once Git is installed on your local machine, tell Git who you are:

```sh
git config --global user.name '<your full name>'
git config --global user.email '<your email address>'
```

Then, tell Git about your preferred default code editor:

```sh
git config --global core.editor '<editor executable>'
```

For example, to use Visual Studio Code as your default editor for Git, replace `<editor executable>` from above with `code --wait` :

```sh
git config --global core.editor 'code --wait'
```

For this workshop, you'll also need lazygit.[ Follow the instructions here](https://github.com/jesseduffield/lazygit?tab=readme-ov-file#installation)


---

# 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://wiki.nushackers.org/hackerschool/lightning-git/getting-started-with-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.
