@ -135,6 +135,18 @@ git push origin main # ou le nom de la branche
## Autres commandes utiles
- Savoir sur quelle branche on se trouve:
```bash
git branch
```
- Créer une nouvelle branche:
```bash
git checkout -b nom-nouvelle-branche
```
- Connaitre l'état du dépôt local:
```bash
@ -153,6 +165,20 @@ git reset --hard HEAD
git diff
```
## Utils
Pour éviter de faire des "git branch" pour savoir dans quelle branche on se trouve, on peut ajouter la référence dans le chemin de notre terminal (Linux) en modifiant les fichier ~/.bashrc: