Wednesday, September 21, 2022

gitignore not working or remove untracked files in git

git rm -r --cached .

git add .

git commit -m "untrack files contained in the .gitignore file"

git reset HEAD . // cancel all commits

git reset --hard

git clean -n

git clean -d -n

https://linuxize.com/post/how-to-remove-untracked-files-in-git/

No comments:

Post a Comment