Files
tldr/pages.fr/common/git-rev-parse.md

17 lines
414 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# git rev-parse
> Afficher les métadonnées liées à des révisions spécifiques.
> Plus d'informations : <https://git-scm.com/docs/git-rev-parse>.
- Afficher le hash de commit de la branche courrante :
`git rev-parse {{nom_de_branche}}`
- Affiche le nom de la branche courrante :
`git rev-parse --abbrev-ref {{HEAD}}`
- Obtenir le chamin absolu du repertoire racine :
`git rev-parse --show-toplevel`