Question: Git does not have a way to backup a working copy. (You can use git commit, but that pollutes your repo with backups.) So I use git diff, but it has an issue with Visual Studio 2010 (VS). Sometimes, VS saves C# files as UTF-8, sometimes UTF-16LE. When VS switches a file from one to the other, the git patch file says, "Binary files a/path1/file1.cs and b/path1/file1.cs differ," and git apply cannot restore from the patch file. What's the easiest solution?

Answer: 
If you have GNU sed, it has an option `I` for case-insensitive match:

```
sed 's/Name://gI;s/Age://gI;s/Hometown://gI' file

```

With a slight change, the awk solution would work:

```
awk '{ for(i=1;i<=NF;i++) {if ($i ~/:/) {$i=""}} ; print }' file

```
Piling on the answer, with perl:

To remove the specific labels:

```
perl -pe 's/(?:name|age|hometown): *//ig' file

```

To remove any label:

```
perl -pe 's/\w+:\s*//ig' file

```

`tr` is not the right tool, because it maps *characters*, not words.