Reputation: 2298
I am a newbie to git hub. I have created a repo and pushed two files to it. By mistake a new file .README.md.swp is created inside my repo. Now I have deleted two files .README.md.swp and ramu.txt locally after that how can I update my repo on original Github site.
Upvotes: 4
Views: 5170
Reputation: 9256
Instead of git add
use git rm <filename>
and then commit and push as usual.
You might also want to add *.swp
to your .gitignore
file.
Upvotes: 2
Reputation: 9049
Try these steps
git rm .README.md.swp
git rm ramu.txt
git commit -m "cleaning up blah blah"
git push origin master
Upvotes: 4
Reputation: 94429
After deleting the files run:
git add .
git commit -m "files delete"
git push origin master
Note that master should be the name of your branch, the default branch name is master
Upvotes: 3