Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
git_clean [2018/05/21 17:50] – [Overview] rpjdaygit_clean [2019/02/28 15:25] (current) – [Overriding standard ignore rules] rpjday
Line 8: Line 8:
 </code> </code>
  
-Config setting:+The single config setting for this command:
  
   * ''clean.requireForce''   * ''clean.requireForce''
  
-Prerequisites: ''gitignore''+Prerequisites: You should understand ''gitignore'' files.
  
 ===== DESCRIPTION ===== ===== DESCRIPTION =====
Line 28: Line 28:
 </code> </code>
  
-Note how both ignored files and new, //staged// files are not cleaned by default. Currently, there is some dissension as to what is meant by files "known to Git."+Note how both ignored files and new, //staged// files are not cleaned by default. Currently, there is some dissension regarding what is meant by files "known to Git."
  
 ===== Basic options ===== ===== Basic options =====
Line 68: Line 68:
  
 ===== Overriding standard ignore rules ===== ===== Overriding standard ignore rules =====
 +
 +The explanation below oddly does not mention the use of the configuration setting ''core.excludesFile''.
  
 <code> <code>
Line 87: Line 89:
     rebuild everything from scratch, but keep manually created     rebuild everything from scratch, but keep manually created
     files.     files.
 +</code>
 +
 +===== Getting a "pristine" working tree =====
 +
 +Create a shell alias:
 +
 +<code>
 +alias gpristine='git reset --hard && git clean -dfx'
 </code> </code>
  • git_clean.1526925040.txt.gz
  • Last modified: 2018/05/21 17:50
  • by rpjday