ajout git checkout fichier
This commit is contained in:
parent
ba95f12cb3
commit
e5d8800211
|
@ -1,4 +1,4 @@
|
||||||
---
|
2---
|
||||||
categories: git
|
categories: git
|
||||||
title: Howto 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>
|
$ 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 :
|
On est alors dans l'état « HEAD détachée ». Pour revenir dans l'état précédent :
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
|
|
Loading…
Reference in a new issue