Difference between revisions of "Git FAQ"

From HaFrWiki
Jump to: navigation, search
m (Reference)
m (Reference)
Line 33: Line 33:
 
<references/>
 
<references/>
  
[[Category:Git:FAQ]]
+
[[Category:Git|FAQ]]
 
[[Category:Index]]
 
[[Category:Index]]
 
[[Category:Programming]]
 
[[Category:Programming]]
 
[[Category:Tools]]
 
[[Category:Tools]]

Revision as of 16:59, 16 July 2017

Rollback to an old Git commit

How to get a previous version of the Git repository. <syntaxhighlight lang="bash"> $ git checkout <revision> </syntaxhighlight> The revision number is the number of the previous version.
To obtain these numbers use: <syntaxhighlight lang="bash"> $ git log commit 8bad69f3c3c37725ee0cb0cfa34fe6a2f5298272 Author: Harm Frielink <harm@harmfrielink.nl> Date: Wed Jul 12 19:34:21 2017 +0200

   Additions

commit d642082afa0aadbff5c926179ab040d2177358cf Author: Harm Frielink <harm@harmfrielink.nl> Date: Fri May 22 11:22:48 2015 +0200

   Added Observer Observable pattern

</syntaxhighlight> The numbers behind the commit are revision numbers.


See also

top

Reference

top