git remove untrack file code example Example 1: git untrack file git rm --cached filename Example 2: how to untrack a file in git git rm -r --cached <file>