Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docs:git:undoing_changes [2009/10/21 23:31] – created billhdocs:git:undoing_changes [2010/10/20 23:05] (current) billh
Line 1: Line 1:
 ====== undoing changes ====== ====== undoing changes ======
  
 +===== put your working copy back the way it was before your changes =====
 +  * reset all tracked/known files<code>
 +git reset --hard head
 +</code>
 +  * remove any untracked files/directories that aren't known (known like listed in a .gitignore file)<code>
 +git clean -df
 +
 +you can also use this to see what would have been done
 +git clean -dn
 +</code>
  
 ===== External Links ===== ===== External Links =====
  * [[http://learn.github.com/p/undoing.html|undoing]]  * [[http://learn.github.com/p/undoing.html|undoing]]
  • docs/git/undoing_changes.1256189467.txt.gz
  • Last modified: 2009/10/21 23:31
  • by billh