skip to Main Content

How To Remove Untracked Files From Current Branch GIT?

How to remove untracked files from current branch GIT?


How to remove untracked files from current branch GIT. many times we need to face that when we run command “git status” at that time git show you untracked files or folder.

How we can remove that untracked files and folder from local git using the command.

Let’s see how we can remove untracked files from local git.

git clean -f

Let’s see how we can remove untracked files from local git.

git clean -d

Also, we can remove untracked files and folders using the single command like.

git clean -f -d

After running above command you can check the untracked files removed or not using below command.

git status

If you face any issue after using above git command write the comment below.

Saroj

I am a web designer and developer part-time blogger. Write something on some free time. Find my every day thought here :)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top