.git/config
[filter "file-cleanup"]
clean = sed -e 's/deeptesh/changed-deeptesh/g'
smudge = cat
.gitattributes
*.sh filter=file-cleanup
This change is working fine. this is replacing deeptesh with changed-deeptesh and when committing, the changes are reflecting in the repo. But, the problem is either after committing, pushing, pulling, checkout the file, reindexing, the rewrite changes are not reflecting in the local editor. The only way its reflecting is by deleting the file in the local and checkout the file again from the remote repo.