06 Apr 2013, 14:35
Generic-user-small

Louis Rhys (22 posts)

I tried setting up a git repository as suggested in Playtime of iteration A2, but there are some erb~ files gets checked in, e.g. “app/views/products/index.html.erb~” (in addition of “app/views/products/index.html.erb”).

Possibly this is a cache created by vim (the editor that I use). How to remove this from repository and ignore such files in the future?

06 Apr 2013, 14:46
Samr_small_pragsmall

Sam Ruby (584 posts)

To remove the files, use git rm.

To ignore such files in the future, edit your .gitignore file.

Once complete, commit your changes.

06 Apr 2013, 15:00
Generic-user-small

Louis Rhys (22 posts)

How to use .gitignore to ignore all such file?

06 Apr 2013, 18:40
Samr_small_pragsmall

Sam Ruby (584 posts)

Add a line that looks like this:

*~
07 Apr 2013, 04:57
Generic-user-small

Louis Rhys (22 posts)

Thanks! I can even do git rm *~ to remove those files that was added :)

  You must be logged in to comment