Use git rm to remove file1.txt:
git rm file1.txt
git commit -m "remove file1.txt"
In order to remove the file only from the Git repository, not from the filesystem, use:
git rm --cached file1.txt
git commit -m "remove file1.txt"
And to push changes to the remote repository use the following command:
git push origin branch_name
For more commands like this please go through the following tutorial that will help you understand the git