find . -type f -name "*.txt" -exec sh -c 'mv "$0" $(echo -n "${$0/-git/}")' '{}' \;
find . -type f -name "*.txt" -print0 | xargs -0 -I{} fname={} && mv "$fname" $(echo -n "${$fname/-git/}")
#!/bin/bash
find . -name "*-git*.txt" | (
IFS='
'
while read oldname
do
newname=${oldname//-git}
mv "$oldname" "$newname"
done
)