theobg
theobg

Reputation: 87

How to remove a file in the github repository to add the file to .gitignore?

I added a yarn-error.log file to my github repository and tried to add it to .gitignore but it remains in the repository ... How do I uncommit this

Upvotes: 0

Views: 68

Answers (2)

ASASCED
ASASCED

Reputation: 71

If you try to delete this file with a .gitignore you will not delete it.

When you upload a file to github the file will always be there. That's so because git needs to store all the files that you have uploaded, so it can retain all the information and records that have been made.

If you want delete the file, go to github and delete it directly with the webpage and make a commit.

After this make a git pull and then you could add the file yarn-error.log to .gitignore

Upvotes: 1

Youssef Saoubou
Youssef Saoubou

Reputation: 591

Adding it to your .gitgnore dosen't automaticly remove it from the remonte repository you can add it to gitgnore and remove the file from github manually

Upvotes: 1

Related Questions