Hello, Sourav,
You could try this command in the terminal:
sed 's/[A-Z|a-z]*\.git$//g' inputfile.txt > outputfile.txt
This will do what you want, if and only if all of the .git filenames begin with a letter.
It uses the 'sed' (string editor) program to match [anyletter].git at the end of a...