> For the complete documentation index, see [llms.txt](https://fanny.gitbook.io/guide-cmd-git/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fanny.gitbook.io/guide-cmd-git/readme.md).

# README

<img src="/files/TkvVvEt53Dd5AWc8u5kE" alt="Figma Logo" width="200">

## 30 commandes Git Utiles

*Un guide détaillé pour maîtriser Git de zéro*

[![Git](https://img.shields.io/badge/Git-2.0+-F05032?style=for-the-badge\&logo=git\&logoColor=white)](https://git-scm.com/) [![Version Control](https://img.shields.io/badge/Version_Control-DVCS-FF8C00?style=for-the-badge)](https://git-scm.com/) [![Branching](https://img.shields.io/badge/Branching-Workflow-4CAF50?style=for-the-badge)](https://git-scm.com/)

> Quand on commence à utiliser Git, on se limite souvent à git add, git commit, et git push... Mais Git propose bien plus pour suivre, tester, corriger ou organiser son travail au quotidien.

***

Voici une sélection de 30 commandes que je trouve pratiques :

<img src="/files/ZKIgKmJNKcGYkM24ltnr" alt="Git 30 commandes utiles" width="500">

### 📋 Table des matières

* [1. Démarrer avec Git](#1-démarrer-avec-git)
* [2. Suivre les changements](#2-suivre-les-changements)
* [3. Travailler avec des branches](#3-travailler-avec-des-branches)
* [4. Travailler avec un dépôt distant](#4-travailler-avec-un-dépôt-distant-ex--github)
* [5. Consulter l'historique et les changements](#5-consulter-lhistorique-et-les-changements)
* [6. Annuler, restaurer ou mettre de côté](#6-annuler-restaurer-ou-mettre-de-côté)
* [7. Pour aller plus loin](#7-pour-aller-plus-loin)

***

#### 🗂️ Structure des 30 commandes Git

```bash
📂 Guide-Cmd-Git
│── 📄 README.md            --> Page d'accueil avec introduction et table des matières
│── 📂 Cmd-Git              --> Dossier pour les commandes Git
│   ├── 📄 demarrer-Git.md       --> Démarrer avec Git (Section 1)
│   ├── 📄 modifs-necessaires.md --> Suivre les changements (Section 2)
│   ├── 📄 branches.md           --> Travailler avec des branches (Section 3)
│   ├── 📄 depot-distant.md      --> Travailler avec un dépôt distant (Section 4)
│   ├── 📄 historique.md         --> Consulter l'historique et les changements (Section 5)
│   ├── 📄 changements.md        --> Annuler, restaurer ou mettre de côté (Section 6)
│   ├── 📄 plus-loin.md          --> Pour aller plus loin (Section 7)
│── 📂 assets               --> Dossier pour les ressources
│   ├── 🖼️ branch-example.png    --> Illustration du branching
│   ├── 🖼️ git-workflow.png      --> Schéma du workflow Git
│   ├── 🖼️ merge-vs-rebase.png   --> Comparaison merge/rebase
│   └── 📂 svg                 --> Sous-dossier pour les icônes SVG
│       ├── 📄 advanced-git.svg
│       ├── 📄 getting-started.svg
│       ├── 📄 git-commands-logo.svg
│       ├── 📄 git-operations.svg
│       ├── 📄 gitcommands-logo.svg
│       ├── 📄 history-and-changes.svg
│       ├── 📄 Licence-MIT-blue.svg
│       ├── 📄 remote-repository.svg
│       ├── 📄 reset-and-stash.svg
│       ├── 📄 tracking-changes.svg
│       └── 📄 working-with-branches.svg
```

***

### 💡 Astuces supplémentaires

* Crée des **alias Git** pour accélérer tes commandes fréquentes:

  ```bash
  git config --global alias.co checkout
  git config --global alias.br branch
  git config --global alias.ci commit
  git config --global alias.st status
  ```

***

*Enregistre ce fichier comme mémo personnel ou partage-le avec ton équipe pour vous aider à mieux exploiter Git !*

[![Licence MIT](https://img.shields.io/badge/Licence-MIT-blue.svg)](https://github.com/fannysaez/guide-commandes-git/tree/main/LICENSE/README.md)

***

<p align="center"><a href="/pages/BmzxpgEpgiMQ44Sc0OJR">Suivant</a></p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://fanny.gitbook.io/guide-cmd-git/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
