# Git

![](https://upload.wikimedia.org/wikipedia/commons/e/e0/Git-logo.svg)

## About

[Git](https://git-scm.com/) is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files.

Not that there is already [native component to manage git](https://code.visualstudio.com/docs/editor/versioncontrol) within VSCode. This module extends the capabilities of git by adding some features.

{% hint style="success" %}
Git is already installed during the VSCode-Anywhere installation process. This module allows you to install only additional VSCode extensions.
{% endhint %}

## Installation

Change `enable` from `False` to `True` in the `git` section (cf [module installation](/vscode-anywhere/modules/install.md)).

```yaml
vscode-anywhere:
    git:
        enabled: True
```

{% hint style="info" %}
You can also take a look at the [VSCode-Anywhere git module configuration](https://github.com/gigi206/VSCode-Anywhere/blob/V2/salt/modules/git/defaults.yaml).
{% endhint %}

For more details read the [official documentation](https://code.visualstudio.com/docs/editor/versioncontrol).

## Requirements

No requirements (`git` is installed during the installation process).

## VSCode

### VSCode extensions

#### Hirse.vscode-ungit

This [extension](https://marketplace.visualstudio.com/items?itemName=Hirse.vscode-ungit) shows [ungit](https://github.com/FredrikNoren/ungit) in Visual Studio Code.

![Ungit](https://raw.githubusercontent.com/Hirse/vscode-ungit/master/screenshots/ungit.png)

#### mhutchie.git-graph

[This extension](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph) allows you to view a Git Graph of your repository, and easily perform Git actions from the graph.

![git-graph](https://github.com/mhutchie/vscode-git-graph/raw/master/resources/demo.gif)

#### eamodio.gitlens

[GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) supercharges the Git capabilities built into Visual Studio Code. It helps you to visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more.

![Gitlens](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/docs/gitlens-preview.gif)

#### lamartire.git-indicators

[This extension](https://marketplace.visualstudio.com/items?itemName=lamartire.git-indicators) shows some got indicators

![](https://raw.githubusercontent.com/lamartire/vscode-git-indicators/master/preview/added.png)

### VSCode settings

```javascript
{
    "gitlens.defaultGravatarsStyle": "retro",
    "ungit.showButton": true,
    "ungit.showInActiveColumn": true
}
```

### VSCode keybindings

No [keybindings](https://code.visualstudio.com/docs/getstarted/keybindings).

## Software

### Windows software

#### scoop

* [nodejs](https://github.com/ScoopInstaller/Main/blob/master/bucket/nodejs.json)

### Linux software

#### brew

* [node](https://formulae.brew.sh/formula/node)  (required for credentials-helper)

### MacOS software

#### brew

* [node](https://formulae.brew.sh/formula/node) (required for credentials-helper)

## Documentation

No documentation.

## VSCode-Anywhere

### Environment

```yaml
vscode-anywhere:
  git:
    env:
      PATH: C:\VSCode-Anywhere\scoop\apps\nodejs\current

```

{% hint style="info" %}
Assuming you have installed in the default directory `C:\VSCode-Anywhere`.
{% endhint %}

### Specific settings

No specific settings.


---

# 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://gigi206.gitbook.io/vscode-anywhere/modules/list/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.
