Afrin Gaffar
Afrin Gaffar

Reputation: 73

Remove files from GitHub

I have deleted some files from local computer and pushed the changes to Github. However I want to remove those changes in GitHub also. I tried git rm . Not working. Any idea how to remove those files.Here is the file I want to remove

Upvotes: 0

Views: 1387

Answers (1)

Khushali
Khushali

Reputation: 21

If you want to remove the file from the Git repository forcefully then use -f :

git rm -f file1.txt git commit -m "remove file1.txt"

If you want to remove from github only and want in your local git rm --cached file1.txt git commit -m "remove file1.txt"

Than push to your relative branch git push origin <branch_name>

Upvotes: 2

Related Questions