Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove files from master at github

Tags:

git

github

ubuntu

First time playing with git, and I accidentally added all hidden files with my commit. Now that I have set up my .gitignore, and committed my changes, all the files ending with "~" are still there.

How do I commit my local files, and remove those from master that are not supposed to be there any more?

like image 535
danielsvane Avatar asked Mar 19 '12 22:03

danielsvane


1 Answers

Use git rm --cached FILENAME to delete it from the repository but keep the file physically and git add FILENAME to add a file to your repository. You will need to commit both of these changes with git commit

like image 106
QuantumBlack Avatar answered Nov 09 '22 01:11

QuantumBlack