开发者

Remove files that should not have been commited

I have a .gitignore file in my project directory and I placed the following entry in the file to not to commit the files in the following folder:

ES开发者_如何学GotudyMongoDb.Integration.Test\

For some reason Git pushed the files to repository anyway!

Anyway! now I want to remove those files that have been pushed to the repository but I don't want to loose my local changes to the files inside the folder. How can I do that?


Use git rm --cached to remove the files from the index but not from your working copy. Then, commit the changes.


Replace the \ with / or remove it completely. Use git rm --cached EStudyMongoDb.Integration.Test to remove it from the index

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜