# Git

## Git

Logiciel de versionning

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

#### Installation

```bash
sudo dnf install git-all # Install Git
git version              # Check your git version
```

### Autocomplétion

#### Activer autocomplétion des commandes

Activer la correction automatique pour les commandes Git

{% hint style="info" %}
Vous devez attribuer une valeur au paramètre de configuration help.autocorrect.
{% endhint %}

```bash
git config --global help.autocorrect 1
```

#### Désactiver la correction automatique

```bash
git config --global --unset help.autocorrect
```

***

## GitHub CLI

GitHub CLI est un outil open source pour utiliser GitHub depuis votre terminal.

```bash
sudo dnf install 'dnf-command(config-manager)'
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install gh
sudo dnf update gh
```

{% embed url="<https://github.com/cli/cli/blob/trunk/docs/install_linux.md#fedora-centos-red-hat-enterprise-linux-dnf>" %}

***

## Gac

Un script permettant de faire une commande `git add -A && git commit -m "message"` plus rapidement :)

{% embed url="<https://github.com/devpolo/gac>" %}

### Commandes disponible

```bash
gac                     # print available semantics
gac c <your message>    # git add -A && git commit -m "chore: <your message>"
gac d <your message>    # git add -A && git commit -m "docs: <your message>"
gac f <your message>    # git add -A && git commit -m "feat: <your message>"
gac r <your message>    # git add -A && git commit -m "refactor: <your message>"
gac s <your message>    # git add -A && git commit -m "style: <your message>"
gac t <your message>    # git add -A && git commit -m "test: <your message>"
gac x <your message>    # git add -A && git commit -m "fix: <your message>"
gac <your message>      # git add -A && git commit -m "<your message>"
```


---

# 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.chamallow.com/1.-technologie/dev-tools/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.
