22
0
Fork 0

ajout git checkout fichier

This commit is contained in:
jdubois 2018-04-12 16:57:21 +02:00
parent ba95f12cb3
commit e5d8800211
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,4 @@
---
2---
categories: git
title: Howto Git
...
@ -456,6 +456,12 @@ Pour avoir le dépôt tel qu'il était à un commit :
$ git checkout <SHA1 du commit>
~~~
Ou, un fichier spécifique tel qu'il était à un commit :
~~~
$ git checkout <SHA1 du commit> -- <fichier>
~~~
On est alors dans l'état « HEAD détachée ». Pour revenir dans l'état précédent :
~~~