To assume unchange git update-index --assume-unchanged -- <file> To revert back git update-index --no-assume-unchanged <file> To list all marked as assume-unchanged git ls-files -v | grep "^[a-z]" Removing files to repo git filter-branch --tree-filter 'rm -rf <file>' HEAD Removing node_modules to git permanently add 'node_modules' to .gitignore file git rm -r --cached node_modules git commit -m 'Removed node_modules, ignored node_modules' git push origin master Counting files and lines of code git diff --shortstat `git hash-object -t tree /dev/null` Adding changes to current commit *Note: Use this only if branch is not yet pushed to origin git commit -a --amend