how to untrack file from changes code example Example 1: git untrack file git rm --cached filename Example 2: git untrack git rm -r --cached <file>