Answers for "git discard untracked file changes"

1

how to remove untracked files in git

git clean -fd
Posted by: Guest on June-14-2020
2

how to delete unstaged files that were recently added locally

To see what files will be removed:
git clean -n <optional file_name/dir>

To actually delete those files:
git clean -f <optional file_name/dir>
Posted by: Guest on July-26-2020
0

reset untracked files

How to remove local untracked files from the current Git branch
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.
Posted by: Guest on December-09-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language