how to untrace git file code example Example 1: git untrack file git rm --cached filename Example 2: github untrack files git rm -r --cached .