How to remove untracked files from the current Git branch

1379

Get all untracked files which filles will be deleted you can use given Git command.

          “How to remove untracked files from the current Git branch”

git clean -n

Example of remove untracked files from the current Git branch:

How to remove untracked files from the current Git branch

Clean Step: this will delete files:

  git clean -f                                                         
To remove directories, run git clean -f -d or git clean -fd
To remove ignored files, run git clean -f -X or git clean -fX
To remove ignored and non-ignored files, run git clean -f -x or git clean -fx

LEAVE A REPLY

Please enter your comment!
Please enter your name here